From 7096b494fac72a9b4444f2b5b7f32d3bdc17d44a Mon Sep 17 00:00:00 2001 From: Eric Wong Date: Sun, 11 Oct 2009 23:48:36 -0700 Subject: SIGINT/SIGTERM shuts down instantly in workers Just like in Unicorn... --- lib/rainbows/base.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lib/rainbows/base.rb') diff --git a/lib/rainbows/base.rb b/lib/rainbows/base.rb index 4d5fec1..f24de31 100644 --- a/lib/rainbows/base.rb +++ b/lib/rainbows/base.rb @@ -32,7 +32,7 @@ module Rainbows trap(:USR1) { reopen_worker_logs(worker.nr) rescue nil } # closing anything we IO.select on will raise EBADF trap(:QUIT) { HttpServer::LISTENERS.map! { |s| s.close rescue nil } } - [:TERM, :INT].each { |sig| trap(sig) { exit(0) } } # instant shutdown + [:TERM, :INT].each { |sig| trap(sig) { exit!(0) } } # instant shutdown logger.info "Rainbows! #@use worker_connections=#@worker_connections" end -- cgit v1.2.3-24-ge0c7