diff options
author | Eric Wong <normalperson@yhbt.net> | 2009-04-25 11:28:27 -0700 |
---|---|---|
committer | Eric Wong <normalperson@yhbt.net> | 2009-04-25 11:28:27 -0700 |
commit | 87aef35405263fd67ad6b78ed9977366915904e7 (patch) | |
tree | bbd538564830b0be6c082773a3d719695f763228 /lib/unicorn.rb | |
parent | a1c61a663dbeda29967614ead7cac018281ed9de (diff) | |
download | unicorn-87aef35405263fd67ad6b78ed9977366915904e7.tar.gz |
We were closing a no-longer-existent I/O object to break out of IO.select. This was broken in 0.6.0 but did not affect the worker when it was busy.
Diffstat (limited to 'lib/unicorn.rb')
-rw-r--r-- | lib/unicorn.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/unicorn.rb b/lib/unicorn.rb index d1c7eeb..54e2bc0 100644 --- a/lib/unicorn.rb +++ b/lib/unicorn.rb @@ -478,7 +478,7 @@ module Unicorn client = nil # closing anything we IO.select on will raise EBADF - trap(:USR1) { nr = -65536; rd.close rescue nil } + trap(:USR1) { nr = -65536; SELF_PIPE.first.close rescue nil } trap(:QUIT) { alive = nil; LISTENERS.each { |s| s.close rescue nil } } [:TERM, :INT].each { |sig| trap(sig) { exit(0) } } # instant shutdown @logger.info "worker=#{worker.nr} ready" |