# HG changeset patch # User Igor Sysoev # Date 1083183714 0 # Node ID 9a0ffa21f1936f4d0e8bf144f8501ed3d224c128 # Parent fb4dfb2ac0fc171c5347abed7588e33df15a423b nginx-0.0.3-2004-04-29-00:21:54 import diff --git a/src/os/unix/ngx_process_cycle.c b/src/os/unix/ngx_process_cycle.c --- a/src/os/unix/ngx_process_cycle.c +++ b/src/os/unix/ngx_process_cycle.c @@ -42,7 +42,8 @@ u_char master_process[] = "master proce void ngx_master_process_cycle(ngx_cycle_t *cycle, ngx_master_ctx_t *ctx) { - char *title, *p; + char *title; + u_char *p; size_t size; ngx_int_t n; ngx_uint_t i; @@ -83,7 +84,7 @@ void ngx_master_process_cycle(ngx_cycle_ p = ngx_cpymem(title, master_process, sizeof(master_process) - 1); for (n = 0; n < ctx->argc; n++) { *p++ = ' '; - p = ngx_cpystrn(p, ctx->argv[n], size); + p = ngx_cpystrn(p, (u_char *) ctx->argv[n], size); } ngx_setproctitle(title); @@ -220,6 +221,15 @@ void ngx_master_process_cycle(ngx_cycle_ if (ngx_reconfigure) { ngx_reconfigure = 0; + + if (ngx_new_binary) { + ngx_log_error(NGX_LOG_INFO, cycle->log, 0, "start new workers"); + + ngx_start_worker_processes(cycle, ccf->worker_processes, + NGX_PROCESS_JUST_RESPAWN); + continue; + } + ngx_log_error(NGX_LOG_INFO, cycle->log, 0, "reconfiguring"); cycle = ngx_init_cycle(cycle);