OCaml 4.05 adds an optional cloexec parameter to several Unix functions, allowing the close-on-exec flag to be set as the operation is performed atomically on some platforms (limited to Linux atm.) -- otherwise there's a race condition when there are multiple (system) threads.
These functions would be affected: Lwt_unix.dup, dup2, pipe, socket, socketpair, accept.
Other functions that build on them and could also take ?cloexec: accept_n, pipe_in, pipe_out.