Hi,

At Sun, 15 Mar 2009 09:14:24 +0900,
David Martin wrote in [ruby-core:22893]:
> Linux has a the most useful O_CLOEXEC flag for open() that
> sets the CLOEXEC flag on the new file descriptor.
> 
> You can currently set the CLOEXEC flag on an open file
> descriptor using IO::fcntl(), but note that this does *not*
> work in a multithreaded program: If one thread does
> open/fcntl while another does an exec, there is a race
> condition that could produce a file descriptor leak.  The
> only safe way to open a file with the CLOEXEC flag set in
> general (as far as I know) is to use the O_CLOEXEC flag to
> open().

Is it Linux only?

-- 
Nobu Nakada