joyent/libuv — pull request #1091 by indutny (2014-01-29 21:32:28+00:00)
Title: fs: `uv__cloexec()` opened fd

Every file descriptor opened using libuv should be automatically marked
as CLOEXEC to prevent it from leaking to a child process. Note that
since we are opening fds in a thread pool, there is a possible race
condition between `uv_spawn()` and the `open()` + `uv__cloexec()`. The
rwlock was added to avoid it.

see https://github.com/joyent/node/issues/6905