]> git.kaiwu.me - nginx.git/commitdiff
Merging r4020:
authorIgor Sysoev <igor@sysoev.ru>
Tue, 1 Nov 2011 11:26:56 +0000 (11:26 +0000)
committerIgor Sysoev <igor@sysoev.ru>
Tue, 1 Nov 2011 11:26:56 +0000 (11:26 +0000)
SIGWINCH/NOACCEPT signal is disabled now in non-daemon mode.
Non-daemon mode is currently used by supervisord, daemontools and so on
or during debugging. The NOACCEPT signal is only used for online upgrade
which is not supported when nginx is run under supervisord, etc.,
so this change should not break existant setups.

src/os/unix/ngx_process.c

index 605558786f2d5c2010bd985ab1d506b43615e437..ad2fc19de9ff7bacb30062a1a0adf17561118081 100644 (file)
@@ -339,8 +339,10 @@ ngx_signal_handler(int signo)
             break;
 
         case ngx_signal_value(NGX_NOACCEPT_SIGNAL):
-            ngx_noaccept = 1;
-            action = ", stop accepting connections";
+            if (ngx_daemonized) {
+                ngx_noaccept = 1;
+                action = ", stop accepting connections";
+            }
             break;
 
         case ngx_signal_value(NGX_RECONFIGURE_SIGNAL):
@@ -392,6 +394,9 @@ ngx_signal_handler(int signo)
         switch (signo) {
 
         case ngx_signal_value(NGX_NOACCEPT_SIGNAL):
+            if (!ngx_daemonized) {
+                break;
+            }
             ngx_debug_quit = 1;
         case ngx_signal_value(NGX_SHUTDOWN_SIGNAL):
             ngx_quit = 1;