http_server: avoid race conditions on SIGQUIT
commitb3b6b0dff19f8a22a96525bba22bf061d03c3fc5
authorEric Wong <normalperson@yhbt.net>
Thu, 23 Jun 2011 05:12:08 +0000 (23 05:12 +0000)
committerEric Wong <normalperson@yhbt.net>
Thu, 23 Jun 2011 06:13:43 +0000 (23 06:13 +0000)
treee269e29b4d853e21917a336ff3359b65b06c8b0b
parentfbe48964d79f3d592f4f75960c5940add9ccf22a
http_server: avoid race conditions on SIGQUIT

We don't want the Worker#tick= assignment to trigger after we
accept a client, since we'd drop that request when we raise the
exception that breaks us out of the worker loop.

Also, we don't want to enter IO.select with an empty LISTENERS
array so we can fail with IOError or Errno::EBADF.
lib/unicorn/http_server.rb