aboutsummaryrefslogtreecommitdiff
path: root/src/os/unix/ngx_process.c
diff options
context:
space:
mode:
authorIgor Sysoev <igor@sysoev.ru>2011-08-22 12:34:48 +0000
committerIgor Sysoev <igor@sysoev.ru>2011-08-22 12:34:48 +0000
commit566dfe0c7fc4ca8405cbed3f9cdacea29d584055 (patch)
treee2ca1875908b654c929b3c62f21fca5e5f4b2376 /src/os/unix/ngx_process.c
parent0d18687b03b2ebfe83a70ae4b4612c33129d4e04 (diff)
downloadnginx-566dfe0c7fc4ca8405cbed3f9cdacea29d584055.tar.gz
nginx-566dfe0c7fc4ca8405cbed3f9cdacea29d584055.zip
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.
Diffstat (limited to 'src/os/unix/ngx_process.c')
-rw-r--r--src/os/unix/ngx_process.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/src/os/unix/ngx_process.c b/src/os/unix/ngx_process.c
index 605558786..ad2fc19de 100644
--- a/src/os/unix/ngx_process.c
+++ b/src/os/unix/ngx_process.c
@@ -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;