mirror of
https://github.com/nginx/nginx.git
synced 2025-08-06 14:56:15 +08:00
a signaller process should stop configuration processing just after
it is able to get pid file, this allows to not open log files, etc.
This commit is contained in:
parent
7b6b09f105
commit
165aa39230
@ -330,6 +330,10 @@ main(int argc, char *const *argv)
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (ngx_signal) {
|
||||||
|
return ngx_signal_process(cycle, ngx_signal);
|
||||||
|
}
|
||||||
|
|
||||||
ngx_os_status(cycle->log);
|
ngx_os_status(cycle->log);
|
||||||
|
|
||||||
ngx_cycle = cycle;
|
ngx_cycle = cycle;
|
||||||
@ -340,10 +344,6 @@ main(int argc, char *const *argv)
|
|||||||
ngx_process = NGX_PROCESS_MASTER;
|
ngx_process = NGX_PROCESS_MASTER;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (ngx_signal) {
|
|
||||||
return ngx_signal_process(cycle, ngx_signal);
|
|
||||||
}
|
|
||||||
|
|
||||||
#if !(NGX_WIN32)
|
#if !(NGX_WIN32)
|
||||||
|
|
||||||
if (ngx_init_signals(cycle->log) != NGX_OK) {
|
if (ngx_init_signals(cycle->log) != NGX_OK) {
|
||||||
|
@ -269,7 +269,6 @@ ngx_init_cycle(ngx_cycle_t *old_cycle)
|
|||||||
cycle->conf_file.data);
|
cycle->conf_file.data);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
for (i = 0; ngx_modules[i]; i++) {
|
for (i = 0; ngx_modules[i]; i++) {
|
||||||
if (ngx_modules[i]->type != NGX_CORE_MODULE) {
|
if (ngx_modules[i]->type != NGX_CORE_MODULE) {
|
||||||
continue;
|
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);
|
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) {
|
||||||
if (ngx_open_listening_sockets(cycle) != NGX_OK) {
|
goto failed;
|
||||||
goto failed;
|
}
|
||||||
}
|
|
||||||
|
|
||||||
if (!ngx_test_config) {
|
if (!ngx_test_config) {
|
||||||
ngx_configure_listening_sockets(cycle);
|
ngx_configure_listening_sockets(cycle);
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user