diff options
Diffstat (limited to 'src/os/unix/ngx_process_cycle.c')
-rw-r--r-- | src/os/unix/ngx_process_cycle.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/src/os/unix/ngx_process_cycle.c b/src/os/unix/ngx_process_cycle.c index dfdfae081..8ada10652 100644 --- a/src/os/unix/ngx_process_cycle.c +++ b/src/os/unix/ngx_process_cycle.c @@ -355,6 +355,8 @@ ngx_start_worker_processes(ngx_cycle_t *cycle, ngx_int_t n, ngx_int_t type) ngx_log_error(NGX_LOG_NOTICE, cycle->log, 0, "start worker processes"); + ngx_memzero(&ch, sizeof(ngx_channel_t)); + ch.command = NGX_CMD_OPEN_CHANNEL; for (i = 0; i < n; i++) { @@ -401,6 +403,8 @@ ngx_start_cache_manager_processes(ngx_cycle_t *cycle, ngx_uint_t respawn) &ngx_cache_manager_ctx, "cache manager process", respawn ? NGX_PROCESS_JUST_RESPAWN : NGX_PROCESS_RESPAWN); + ngx_memzero(&ch, sizeof(ngx_channel_t)); + ch.command = NGX_CMD_OPEN_CHANNEL; ch.pid = ngx_processes[ngx_process_slot].pid; ch.slot = ngx_process_slot; @@ -460,6 +464,8 @@ ngx_signal_worker_processes(ngx_cycle_t *cycle, int signo) ngx_err_t err; ngx_channel_t ch; + ngx_memzero(&ch, sizeof(ngx_channel_t)); + #if (NGX_BROKEN_SCM_RIGHTS) ch.command = 0; @@ -561,6 +567,8 @@ ngx_reap_children(ngx_cycle_t *cycle) ngx_channel_t ch; ngx_core_conf_t *ccf; + ngx_memzero(&ch, sizeof(ngx_channel_t)); + ch.command = NGX_CMD_CLOSE_CHANNEL; ch.fd = -1; @@ -706,6 +714,7 @@ ngx_master_process_exit(ngx_cycle_t *cycle) ngx_exit_log = *ngx_cycle->log; ngx_exit_log.file = &ngx_exit_log_file; + ngx_exit_log.next = NULL; ngx_exit_cycle.log = &ngx_exit_log; ngx_exit_cycle.files = ngx_cycle->files; @@ -1058,6 +1067,7 @@ ngx_worker_process_exit(ngx_cycle_t *cycle) ngx_exit_log = *ngx_cycle->log; ngx_exit_log.file = &ngx_exit_log_file; + ngx_exit_log.next = NULL; ngx_exit_cycle.log = &ngx_exit_log; ngx_exit_cycle.files = ngx_cycle->files; |