about summary refs log tree commit homepage
path: root/lib
diff options
context:
space:
mode:
authorEric Wong <normalperson@yhbt.net>2009-04-14 13:56:15 -0700
committerEric Wong <normalperson@yhbt.net>2009-04-14 13:56:15 -0700
commit8cd8de4637b5731b4d3ade587307d7241ce99eff (patch)
tree67161fdc4c05adbcbb100b3ed5253be7c191790d /lib
parent157409f5d839cbc9dee755907e41aaa78634935d (diff)
downloadunicorn-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')
-rw-r--r--lib/unicorn.rb1
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