aboutsummaryrefslogtreecommitdiff
path: root/src/core/nginx.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/core/nginx.c')
-rw-r--r--src/core/nginx.c18
1 files changed, 11 insertions, 7 deletions
diff --git a/src/core/nginx.c b/src/core/nginx.c
index a19695ccf..8dc610240 100644
--- a/src/core/nginx.c
+++ b/src/core/nginx.c
@@ -36,18 +36,18 @@ static ngx_command_t ngx_core_commands[] = {
offsetof(ngx_core_conf_t, master),
NULL },
- { ngx_string("pid"),
+ { ngx_string("worker_processes"),
NGX_MAIN_CONF|NGX_CONF_TAKE1,
- ngx_conf_set_core_str_slot,
+ ngx_conf_set_core_num_slot,
0,
- offsetof(ngx_core_conf_t, pid),
+ offsetof(ngx_core_conf_t, worker_processes),
NULL },
- { ngx_string("worker_reopen"),
+ { ngx_string("pid"),
NGX_MAIN_CONF|NGX_CONF_TAKE1,
- ngx_conf_set_core_flag_slot,
+ ngx_conf_set_core_str_slot,
0,
- offsetof(ngx_core_conf_t, worker_reopen),
+ offsetof(ngx_core_conf_t, pid),
NULL },
ngx_null_command
@@ -174,6 +174,10 @@ int main(int argc, char *const *argv)
}
}
+ if (ccf->worker_processes == NGX_CONF_UNSET) {
+ ccf->worker_processes = 1;
+ }
+
if (ccf->pid.len == 0) {
ccf->pid.len = sizeof(NGINX_PID) - 1;
ccf->pid.data = NGINX_PID;
@@ -361,7 +365,7 @@ static ngx_int_t ngx_core_module_init(ngx_cycle_t *cycle)
*/
ccf->daemon = NGX_CONF_UNSET;
ccf->master = NGX_CONF_UNSET;
- ccf->worker_reopen = NGX_CONF_UNSET;
+ ccf->worker_processes = NGX_CONF_UNSET;
ccf->user = (ngx_uid_t) NGX_CONF_UNSET;
ccf->group = (ngx_gid_t) NGX_CONF_UNSET;