apply TCP socket options on inherited sockets
commit1db9a8243d42cc86d5ca4901bceb305061d0d212
authorEric Wong <e@80x24.org>
Sat, 27 Jun 2015 02:47:35 +0000 (27 02:47 +0000)
committerEric Wong <e@80x24.org>
Sat, 27 Jun 2015 02:47:35 +0000 (27 02:47 +0000)
tree4d46661f110cf9e3d45bd67a689be0c721156609
parentd23d4713dc9ab9732c574f5aa34a4b6740b43164
apply TCP socket options on inherited sockets

TCP socket options are now set when inheriting existing sockets from
a parent process.  I'm fairly certain all the TCP setsockopt knobs
we use are idempotent and harmless to change.

If anything, the only directive I'd be uncomfortable changing is
shortening the listen(2) (aka :backlog) size, but we've always
changed that anyways since it also applies to UNIX sockets.

Note: removing a configuration knob in a unicorn config file can not
reset the value to the OS-provided default setting.  Inherited
sockets must use a new setting to override existing ones.
(or the socket needs to be closed and re-created in the process
 launcher before unicorn inherits it).

Noticed-by: Christos Trochalakis <yatiohi@ideopolis.gr>
  <20150626114129.GA25883@luke.ws.skroutz.gr>
lib/unicorn/http_server.rb