comparison src/os/unix/ngx_process_cycle.c @ 329:9a0ffa21f193

nginx-0.0.3-2004-04-29-00:21:54 import
author Igor Sysoev <igor@sysoev.ru>
date Wed, 28 Apr 2004 20:21:54 +0000
parents e0f3f238db09
children fade4edd61f8
comparison
equal deleted inserted replaced
328:fb4dfb2ac0fc 329:9a0ffa21f193
40 u_char master_process[] = "master process"; 40 u_char master_process[] = "master process";
41 41
42 42
43 void ngx_master_process_cycle(ngx_cycle_t *cycle, ngx_master_ctx_t *ctx) 43 void ngx_master_process_cycle(ngx_cycle_t *cycle, ngx_master_ctx_t *ctx)
44 { 44 {
45 char *title, *p; 45 char *title;
46 u_char *p;
46 size_t size; 47 size_t size;
47 ngx_int_t n; 48 ngx_int_t n;
48 ngx_uint_t i; 49 ngx_uint_t i;
49 sigset_t set; 50 sigset_t set;
50 struct timeval tv; 51 struct timeval tv;
81 title = ngx_palloc(cycle->pool, size); 82 title = ngx_palloc(cycle->pool, size);
82 83
83 p = ngx_cpymem(title, master_process, sizeof(master_process) - 1); 84 p = ngx_cpymem(title, master_process, sizeof(master_process) - 1);
84 for (n = 0; n < ctx->argc; n++) { 85 for (n = 0; n < ctx->argc; n++) {
85 *p++ = ' '; 86 *p++ = ' ';
86 p = ngx_cpystrn(p, ctx->argv[n], size); 87 p = ngx_cpystrn(p, (u_char *) ctx->argv[n], size);
87 } 88 }
88 89
89 ngx_setproctitle(title); 90 ngx_setproctitle(title);
90 91
91 92
218 ngx_signal_value(NGX_SHUTDOWN_SIGNAL)); 219 ngx_signal_value(NGX_SHUTDOWN_SIGNAL));
219 } 220 }
220 221
221 if (ngx_reconfigure) { 222 if (ngx_reconfigure) {
222 ngx_reconfigure = 0; 223 ngx_reconfigure = 0;
224
225 if (ngx_new_binary) {
226 ngx_log_error(NGX_LOG_INFO, cycle->log, 0, "start new workers");
227
228 ngx_start_worker_processes(cycle, ccf->worker_processes,
229 NGX_PROCESS_JUST_RESPAWN);
230 continue;
231 }
232
223 ngx_log_error(NGX_LOG_INFO, cycle->log, 0, "reconfiguring"); 233 ngx_log_error(NGX_LOG_INFO, cycle->log, 0, "reconfiguring");
224 234
225 cycle = ngx_init_cycle(cycle); 235 cycle = ngx_init_cycle(cycle);
226 if (cycle == NULL) { 236 if (cycle == NULL) {
227 cycle = (ngx_cycle_t *) ngx_cycle; 237 cycle = (ngx_cycle_t *) ngx_cycle;