aboutsummaryrefslogtreecommitdiff
path: root/src/os/unix/ngx_posix_init.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/os/unix/ngx_posix_init.c')
-rw-r--r--src/os/unix/ngx_posix_init.c11
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;