diff options
author | Jamis Buck <jamis@37signals.com> | 2005-11-02 13:21:22 +0000 |
---|---|---|
committer | Jamis Buck <jamis@37signals.com> | 2005-11-02 13:21:22 +0000 |
commit | 49cd52a93febcef28a5ae2ed5427294ec5159548 (patch) | |
tree | fbcedb4af385c55c4b06f08c822ae5ba54db8803 /railties/lib | |
parent | a52132af587efa9bc9cefe3394499a681418c37e (diff) | |
download | rails-49cd52a93febcef28a5ae2ed5427294ec5159548.tar.gz rails-49cd52a93febcef28a5ae2ed5427294ec5159548.tar.bz2 rails-49cd52a93febcef28a5ae2ed5427294ec5159548.zip |
Make fcgi handler respond to TERM signals with an explicit exit
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@2847 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
Diffstat (limited to 'railties/lib')
-rw-r--r-- | railties/lib/fcgi_handler.rb | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/railties/lib/fcgi_handler.rb b/railties/lib/fcgi_handler.rb index 3d769b71a1..0170d6904e 100644 --- a/railties/lib/fcgi_handler.rb +++ b/railties/lib/fcgi_handler.rb @@ -6,7 +6,7 @@ require 'rbconfig' class RailsFCGIHandler SIGNALS = { 'HUP' => :reload, - 'TERM' => :exit, + 'TERM' => :exit_now, 'USR1' => :exit, 'USR2' => :restart } @@ -117,6 +117,11 @@ class RailsFCGIHandler dispatcher_log :warn, "Ignoring unsupported signal #{signal}." end + def exit_now_handler(signal) + dispatcher_log :info, "asked to terminate immediately" + exit + end + def exit_handler(signal) dispatcher_log :info, "asked to terminate ASAP" @when_ready = :exit |