Mercurial > hg > nginx
comparison src/core/ngx_cycle.c @ 2923:d9c46f98b09f
a signaller process should stop configuration processing just after
it is able to get pid file, this allows to not open log files, etc.
author | Igor Sysoev <igor@sysoev.ru> |
---|---|
date | Sat, 06 Jun 2009 12:41:31 +0000 |
parents | c7d57b539248 |
children | a0987c332d8e |
comparison
equal
deleted
inserted
replaced
2922:f0604d0b28a6 | 2923:d9c46f98b09f |
---|---|
267 if (ngx_test_config) { | 267 if (ngx_test_config) { |
268 ngx_log_stderr(0, "the configuration file %s syntax is ok", | 268 ngx_log_stderr(0, "the configuration file %s syntax is ok", |
269 cycle->conf_file.data); | 269 cycle->conf_file.data); |
270 } | 270 } |
271 | 271 |
272 | |
273 for (i = 0; ngx_modules[i]; i++) { | 272 for (i = 0; ngx_modules[i]; i++) { |
274 if (ngx_modules[i]->type != NGX_CORE_MODULE) { | 273 if (ngx_modules[i]->type != NGX_CORE_MODULE) { |
275 continue; | 274 continue; |
276 } | 275 } |
277 | 276 |
285 return NULL; | 284 return NULL; |
286 } | 285 } |
287 } | 286 } |
288 } | 287 } |
289 | 288 |
289 if (ngx_process == NGX_PROCESS_SIGNALLER) { | |
290 return cycle; | |
291 } | |
290 | 292 |
291 ccf = (ngx_core_conf_t *) ngx_get_conf(cycle->conf_ctx, ngx_core_module); | 293 ccf = (ngx_core_conf_t *) ngx_get_conf(cycle->conf_ctx, ngx_core_module); |
292 | 294 |
293 if (ngx_test_config) { | 295 if (ngx_test_config) { |
294 | 296 |
562 } | 564 } |
563 #endif | 565 #endif |
564 } | 566 } |
565 } | 567 } |
566 | 568 |
567 if (ngx_process != NGX_PROCESS_SIGNALLER) { | 569 if (ngx_open_listening_sockets(cycle) != NGX_OK) { |
568 if (ngx_open_listening_sockets(cycle) != NGX_OK) { | 570 goto failed; |
569 goto failed; | 571 } |
570 } | 572 |
571 | 573 if (!ngx_test_config) { |
572 if (!ngx_test_config) { | 574 ngx_configure_listening_sockets(cycle); |
573 ngx_configure_listening_sockets(cycle); | |
574 } | |
575 } | 575 } |
576 | 576 |
577 | 577 |
578 /* commit the new cycle configuration */ | 578 /* commit the new cycle configuration */ |
579 | 579 |