diff options
author | Eric Wong <normalperson@yhbt.net> | 2009-11-13 11:10:24 +0000 |
---|---|---|
committer | Eric Wong <normalperson@yhbt.net> | 2009-11-13 21:34:43 +0000 |
commit | 0a0754fc3918b65d0888e3832071086b02e05e97 (patch) | |
tree | ee1dfcbccd0827b26b4d64fb3da3cdd9f190b95c /lib/rainbows/base.rb | |
parent | 4d5a366f386e0f8a0b667e3071a6c027ae560fdd (diff) | |
download | rainbows-0a0754fc3918b65d0888e3832071086b02e05e97.tar.gz |
Permissions for the logs could've been badly set by the master. So we we'll let the master reopen them and refork children to get around this problem. We have to be more careful when reopening logs because we can reopen them in the middle of client requests (we have to) whereas Unicorn has the luxury of _knowing_ it has no active clients when it does the reopen.
Diffstat (limited to 'lib/rainbows/base.rb')
-rw-r--r-- | lib/rainbows/base.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/rainbows/base.rb b/lib/rainbows/base.rb index 03cf624..4597239 100644 --- a/lib/rainbows/base.rb +++ b/lib/rainbows/base.rb @@ -23,7 +23,7 @@ module Rainbows # we're don't use the self-pipe mechanism in the Rainbows! worker # since we don't defer reopening logs HttpServer::SELF_PIPE.each { |x| x.close }.clear - trap(:USR1) { reopen_worker_logs(worker.nr) rescue nil } + trap(:USR1) { reopen_worker_logs(worker.nr) } trap(:QUIT) { G.quit! } [:TERM, :INT].each { |sig| trap(sig) { exit!(0) } } # instant shutdown logger.info "Rainbows! #@use worker_connections=#@worker_connections" |