about summary refs log tree commit homepage
diff options
context:
space:
mode:
-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