aboutsummaryrefslogtreecommitdiff
path: root/src/core/ngx_cycle.c
diff options
context:
space:
mode:
authorIgor Sysoev <igor@sysoev.ru>2009-06-06 12:41:31 +0000
committerIgor Sysoev <igor@sysoev.ru>2009-06-06 12:41:31 +0000
commit165aa392306489574c7bbe9b491b52e9a1c1650e (patch)
tree6b3e42edfda9e70f3cd5343c5ca6a8f53e05281c /src/core/ngx_cycle.c
parent7b6b09f1058853535f48be9b64e278913bb035e7 (diff)
downloadnginx-165aa392306489574c7bbe9b491b52e9a1c1650e.tar.gz
nginx-165aa392306489574c7bbe9b491b52e9a1c1650e.zip
a signaller process should stop configuration processing just after
it is able to get pid file, this allows to not open log files, etc.
Diffstat (limited to 'src/core/ngx_cycle.c')
-rw-r--r--src/core/ngx_cycle.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/src/core/ngx_cycle.c b/src/core/ngx_cycle.c
index 63eec1459..f931ec5e5 100644
--- a/src/core/ngx_cycle.c
+++ b/src/core/ngx_cycle.c
@@ -269,7 +269,6 @@ ngx_init_cycle(ngx_cycle_t *old_cycle)
cycle->conf_file.data);
}
-
for (i = 0; ngx_modules[i]; i++) {
if (ngx_modules[i]->type != NGX_CORE_MODULE) {
continue;
@@ -287,6 +286,9 @@ ngx_init_cycle(ngx_cycle_t *old_cycle)
}
}
+ if (ngx_process == NGX_PROCESS_SIGNALLER) {
+ return cycle;
+ }
ccf = (ngx_core_conf_t *) ngx_get_conf(cycle->conf_ctx, ngx_core_module);
@@ -564,14 +566,12 @@ ngx_init_cycle(ngx_cycle_t *old_cycle)
}
}
- if (ngx_process != NGX_PROCESS_SIGNALLER) {
- if (ngx_open_listening_sockets(cycle) != NGX_OK) {
- goto failed;
- }
+ if (ngx_open_listening_sockets(cycle) != NGX_OK) {
+ goto failed;
+ }
- if (!ngx_test_config) {
- ngx_configure_listening_sockets(cycle);
- }
+ if (!ngx_test_config) {
+ ngx_configure_listening_sockets(cycle);
}