about summary refs log tree commit homepage
path: root/lib
diff options
context:
space:
mode:
authorBrian P O'Rourke <bpo@somnambulance.net>2011-09-14 18:50:29 +0800
committerEric Wong <normalperson@yhbt.net>2011-09-14 17:51:40 -0700
commitb48c6659b294b37f2c6ff3e75c1c9245522d48d1 (patch)
treedf355ca0a98115ba3177d17f4c976d4d0d314e8b /lib
parentdb2cba26acc5748bcf9919e3184a667c46911f8c (diff)
downloadunicorn-b48c6659b294b37f2c6ff3e75c1c9245522d48d1.tar.gz
This prevents the stopping of all workers by SIGWINCH if you're
using a windowing system that will 'exec' unicorn from a process
that's already in a process group.

Acked-by: Eric Wong <normalperson@yhbt.net>
Diffstat (limited to 'lib')
-rw-r--r--lib/unicorn/http_server.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/unicorn/http_server.rb b/lib/unicorn/http_server.rb
index ae0e175..65880d4 100644
--- a/lib/unicorn/http_server.rb
+++ b/lib/unicorn/http_server.rb
@@ -282,7 +282,7 @@ class Unicorn::HttpServer
       when :USR2 # exec binary, stay alive in case something went wrong
         reexec
       when :WINCH
-        if Process.ppid == 1 || Process.getpgrp != $$
+        if Unicorn::Configurator::RACKUP[:daemonized]
           respawn = false
           logger.info "gracefully stopping all workers"
           kill_each_worker(:QUIT)