diff options
Diffstat (limited to 'lib/yahns/server_mp.rb')
-rw-r--r-- | lib/yahns/server_mp.rb | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/lib/yahns/server_mp.rb b/lib/yahns/server_mp.rb index 8818bac..c75a3c9 100644 --- a/lib/yahns/server_mp.rb +++ b/lib/yahns/server_mp.rb @@ -151,7 +151,7 @@ module Yahns::ServerMP # :nodoc: def fdmap_init_mp fdmap = fdmap_init # builds apps (if not preloading) EXIT_SIGS.each { |sig| trap(sig) { sqwakeup(sig) } } - @config = nil + @config.postfork_cleanup # reduce live objects fdmap end @@ -170,12 +170,9 @@ module Yahns::ServerMP # :nodoc: # not performance critical r = IO.select([worker, @sev], nil, nil, alive ? nil : 0.01) and r[0].each { |io| io.yahns_step } - case sig = @sig_queue.shift + case @sig_queue.shift when *EXIT_SIGS - self.listeners = [] - exit(0) unless alive # drop connections immediately if signaled twice - @logger.info("received SIG#{sig}, gracefully exiting") - return false + return quit_enter(alive) when :USR1 usr1_reopen("worker ") end |