diff options
author | Igor Sysoev <igor@sysoev.ru> | 2004-01-28 20:38:54 +0000 |
---|---|---|
committer | Igor Sysoev <igor@sysoev.ru> | 2004-01-28 20:38:54 +0000 |
commit | 812333214f649505ca6d15582a232bda6fc63270 (patch) | |
tree | ad7fe8d5b88155b7b081b6b42c6c6fd9ec439b29 /src/os/unix/ngx_posix_init.c | |
parent | cada4ee47d37e1e954e15a07afc6f45d6fb04342 (diff) | |
download | nginx-812333214f649505ca6d15582a232bda6fc63270.tar.gz nginx-812333214f649505ca6d15582a232bda6fc63270.zip |
nginx-0.0.1-2004-01-28-23:38:54 import
Diffstat (limited to 'src/os/unix/ngx_posix_init.c')
-rw-r--r-- | src/os/unix/ngx_posix_init.c | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/src/os/unix/ngx_posix_init.c b/src/os/unix/ngx_posix_init.c index 84c9c519b..b76a9af75 100644 --- a/src/os/unix/ngx_posix_init.c +++ b/src/os/unix/ngx_posix_init.c @@ -42,6 +42,8 @@ ngx_signal_t signals[] = { "SIG" ngx_value(NGX_CHANGEBIN_SIGNAL), ngx_signal_handler }, + { SIGALRM, "SIGALRM", ngx_signal_handler }, + { SIGINT, "SIGINT", ngx_signal_handler }, { SIGCHLD, "SIGCHLD", ngx_signal_handler }, @@ -99,7 +101,6 @@ void ngx_signal_handler(int signo) ngx_err_t err; ngx_signal_t *sig; - ngx_signal = 1; ignore = 0; err = ngx_errno; @@ -172,6 +173,14 @@ void ngx_signal_handler(int signo) action = ", changing binary"; break; + case SIGALRM: + if (!ngx_terminate) { + ngx_timer = 1; + action = ", shutting down old worker process"; + } + + break; + case SIGCHLD: ngx_reap = 1; break; |