eventmachine/eventmachine — pull request #488 by ebroder (2014-01-16 22:01:19+00:00)
Title: Create file descriptors with O_CLOEXEC where possible

Where possible and supported by the operating system, pass creation-time flag arguments that create close-on-exec file descriptors. On platforms (e.g. OS X) that don't support pipe2(2), accept4(2), or SOCK_CLOEXEC, fall back to creating non-close-on-exec descriptors.

Based on patches by Greg Brockman, Patrick Collison