aboutsummaryrefslogtreecommitdiff
path: root/src/os/unix/ngx_process_cycle.c
diff options
context:
space:
mode:
authorIgor Sysoev <igor@sysoev.ru>2004-03-19 05:25:53 +0000
committerIgor Sysoev <igor@sysoev.ru>2004-03-19 05:25:53 +0000
commitae02c19867083c6ad3e51506109cb37bca1d36d1 (patch)
tree195dbf63aa4155ca9161f096848fe06fbdc3ba6e /src/os/unix/ngx_process_cycle.c
parentda85f7f5fc233a10abf3cbcbda547c918b67fb27 (diff)
downloadnginx-ae02c19867083c6ad3e51506109cb37bca1d36d1.tar.gz
nginx-ae02c19867083c6ad3e51506109cb37bca1d36d1.zip
nginx-0.0.3-2004-03-19-08:25:53 import
Diffstat (limited to 'src/os/unix/ngx_process_cycle.c')
-rw-r--r--src/os/unix/ngx_process_cycle.c34
1 files changed, 18 insertions, 16 deletions
diff --git a/src/os/unix/ngx_process_cycle.c b/src/os/unix/ngx_process_cycle.c
index 76d6bb503..e4d95ada9 100644
--- a/src/os/unix/ngx_process_cycle.c
+++ b/src/os/unix/ngx_process_cycle.c
@@ -38,23 +38,25 @@ void ngx_master_process_cycle(ngx_cycle_t *cycle, ngx_master_ctx_t *ctx)
ngx_msec_t delay;
ngx_core_conf_t *ccf;
- sigemptyset(&set);
- sigaddset(&set, SIGCHLD);
- sigaddset(&set, SIGALRM);
- sigaddset(&set, SIGINT);
- sigaddset(&set, ngx_signal_value(NGX_RECONFIGURE_SIGNAL));
- sigaddset(&set, ngx_signal_value(NGX_REOPEN_SIGNAL));
- sigaddset(&set, ngx_signal_value(NGX_NOACCEPT_SIGNAL));
- sigaddset(&set, ngx_signal_value(NGX_TERMINATE_SIGNAL));
- sigaddset(&set, ngx_signal_value(NGX_SHUTDOWN_SIGNAL));
- sigaddset(&set, ngx_signal_value(NGX_CHANGEBIN_SIGNAL));
-
- if (sigprocmask(SIG_BLOCK, &set, NULL) == -1) {
- ngx_log_error(NGX_LOG_ALERT, cycle->log, ngx_errno,
- "sigprocmask() failed");
- }
+ if (ngx_process == NGX_PROCESS_MASTER) {
+ sigemptyset(&set);
+ sigaddset(&set, SIGCHLD);
+ sigaddset(&set, SIGALRM);
+ sigaddset(&set, SIGINT);
+ sigaddset(&set, ngx_signal_value(NGX_RECONFIGURE_SIGNAL));
+ sigaddset(&set, ngx_signal_value(NGX_REOPEN_SIGNAL));
+ sigaddset(&set, ngx_signal_value(NGX_NOACCEPT_SIGNAL));
+ sigaddset(&set, ngx_signal_value(NGX_TERMINATE_SIGNAL));
+ sigaddset(&set, ngx_signal_value(NGX_SHUTDOWN_SIGNAL));
+ sigaddset(&set, ngx_signal_value(NGX_CHANGEBIN_SIGNAL));
+
+ if (sigprocmask(SIG_BLOCK, &set, NULL) == -1) {
+ ngx_log_error(NGX_LOG_ALERT, cycle->log, ngx_errno,
+ "sigprocmask() failed");
+ }
- sigemptyset(&set);
+ sigemptyset(&set);
+ }
ngx_setproctitle("master process");