aboutsummaryrefslogtreecommitdiff
path: root/src/os/unix/ngx_process_cycle.c
diff options
context:
space:
mode:
authorIgor Sysoev <igor@sysoev.ru>2004-04-28 20:21:54 +0000
committerIgor Sysoev <igor@sysoev.ru>2004-04-28 20:21:54 +0000
commit8a956a65da71a3959c971c06cc9309f78c39c35c (patch)
tree793fef52544fb2d67803150b0c2646ed5ac1bebf /src/os/unix/ngx_process_cycle.c
parent4cec79fb6a3138aeeee400b9c32f23a22cf2dac8 (diff)
downloadnginx-8a956a65da71a3959c971c06cc9309f78c39c35c.tar.gz
nginx-8a956a65da71a3959c971c06cc9309f78c39c35c.zip
nginx-0.0.3-2004-04-29-00:21:54 import
Diffstat (limited to 'src/os/unix/ngx_process_cycle.c')
-rw-r--r--src/os/unix/ngx_process_cycle.c14
1 files changed, 12 insertions, 2 deletions
diff --git a/src/os/unix/ngx_process_cycle.c b/src/os/unix/ngx_process_cycle.c
index 4a281f043..2a4575455 100644
--- 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 process";
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_t *cycle, ngx_master_ctx_t *ctx)
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_t *cycle, ngx_master_ctx_t *ctx)
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);