Fall back to FD_CLOEXEC when O_CLOEXEC is unavailable.

Older Linux systems don't have O_CLOEXEC.  If that's the case, we fcntl
immediately after open, to minimize the length of the racy period in
which an
operation in another thread can leak a file descriptor to a child.
2 files changed