diff options
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 |