diff options
author | Eric Wong <normalperson@yhbt.net> | 2009-04-14 13:56:15 -0700 |
---|---|---|
committer | Eric Wong <normalperson@yhbt.net> | 2009-04-14 13:56:15 -0700 |
commit | 8cd8de4637b5731b4d3ade587307d7241ce99eff (patch) | |
tree | 67161fdc4c05adbcbb100b3ed5253be7c191790d /lib/unicorn.rb | |
parent | 157409f5d839cbc9dee755907e41aaa78634935d (diff) | |
download | unicorn-8cd8de4637b5731b4d3ade587307d7241ce99eff.tar.gz |
Otherwise we get generally worthless backtraces and we don't want to clobber those for other signals, either.
Diffstat (limited to 'lib/unicorn.rb')
-rw-r--r-- | lib/unicorn.rb | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/lib/unicorn.rb b/lib/unicorn.rb index bb4054a..17159bf 100644 --- a/lib/unicorn.rb +++ b/lib/unicorn.rb @@ -453,6 +453,7 @@ module Unicorn alive = true ready = @listeners client = nil + [:TERM, :INT].each { |sig| trap(sig) { exit(0) } } # instant shutdown trap(:QUIT) do alive = false # graceful shutdown @listeners.each { |sock| sock.close rescue nil } # break IO.select |