Sebastian Lackner sebastian@fds-team.de writes:
Signed-off-by: Sebastian Lackner sebastian@fds-team.de
Defining to 0 ensures that it doesn't do any harm. If we don't care about ancient systems, we can probably also remove the fcntl call. On modern systems, setting CLOEXEC twice (via open and fcntl) shouldn't hurt.
I'm too lazy to check, but I'm wondering if passing O_CLOEXEC would cause the open to fail on an ancient system, and whether we should be checking for EINVAL and retrying...