always set FD_CLOEXEC on sockets post-accept()
commit74bbd50328663257c8ee135be7fd2532ef7d1933
authorEric Wong <normalperson@yhbt.net>
Thu, 9 Jul 2009 08:19:24 +0000 (9 01:19 -0700)
committerEric Wong <normalperson@yhbt.net>
Thu, 9 Jul 2009 08:25:31 +0000 (9 01:25 -0700)
treec37f21268d225a9fe7e0252803112cffe745aa8a
parentc8baa439a99d6a898ee3d5b980390a36d23eea2e
always set FD_CLOEXEC on sockets post-accept()

FD_CLOEXEC is not guaranteed to be inherited by the accept()-ed
descriptors even if the listener socket has this set.  This can
be a problem with applications that fork+exec long running
background processes.

Thanks to Paul Sponagl for helping me find this.
lib/unicorn.rb