comparison src/core/nginx.c @ 300:502b03d9d2a3

nginx-0.0.3-2004-03-31-00:31:58 import
author Igor Sysoev <igor@sysoev.ru>
date Tue, 30 Mar 2004 20:31:58 +0000
parents 87e73f067470
children 744965ec6275
comparison
equal deleted inserted replaced
299:46b7eeb8a116 300:502b03d9d2a3
34 ngx_conf_set_core_flag_slot, 34 ngx_conf_set_core_flag_slot,
35 0, 35 0,
36 offsetof(ngx_core_conf_t, master), 36 offsetof(ngx_core_conf_t, master),
37 NULL }, 37 NULL },
38 38
39 { ngx_string("worker_processes"),
40 NGX_MAIN_CONF|NGX_CONF_TAKE1,
41 ngx_conf_set_core_num_slot,
42 0,
43 offsetof(ngx_core_conf_t, worker_processes),
44 NULL },
45
39 { ngx_string("pid"), 46 { ngx_string("pid"),
40 NGX_MAIN_CONF|NGX_CONF_TAKE1, 47 NGX_MAIN_CONF|NGX_CONF_TAKE1,
41 ngx_conf_set_core_str_slot, 48 ngx_conf_set_core_str_slot,
42 0, 49 0,
43 offsetof(ngx_core_conf_t, pid), 50 offsetof(ngx_core_conf_t, pid),
44 NULL },
45
46 { ngx_string("worker_reopen"),
47 NGX_MAIN_CONF|NGX_CONF_TAKE1,
48 ngx_conf_set_core_flag_slot,
49 0,
50 offsetof(ngx_core_conf_t, worker_reopen),
51 NULL }, 51 NULL },
52 52
53 ngx_null_command 53 ngx_null_command
54 }; 54 };
55 55
170 170
171 if (!ngx_inherited && ccf->daemon != 0) { 171 if (!ngx_inherited && ccf->daemon != 0) {
172 if (ngx_daemon(cycle->log) == NGX_ERROR) { 172 if (ngx_daemon(cycle->log) == NGX_ERROR) {
173 return 1; 173 return 1;
174 } 174 }
175 }
176
177 if (ccf->worker_processes == NGX_CONF_UNSET) {
178 ccf->worker_processes = 1;
175 } 179 }
176 180
177 if (ccf->pid.len == 0) { 181 if (ccf->pid.len == 0) {
178 ccf->pid.len = sizeof(NGINX_PID) - 1; 182 ccf->pid.len = sizeof(NGINX_PID) - 1;
179 ccf->pid.data = NGINX_PID; 183 ccf->pid.data = NGINX_PID;
359 * ccf->pid = NULL; 363 * ccf->pid = NULL;
360 * ccf->newpid = NULL; 364 * ccf->newpid = NULL;
361 */ 365 */
362 ccf->daemon = NGX_CONF_UNSET; 366 ccf->daemon = NGX_CONF_UNSET;
363 ccf->master = NGX_CONF_UNSET; 367 ccf->master = NGX_CONF_UNSET;
364 ccf->worker_reopen = NGX_CONF_UNSET; 368 ccf->worker_processes = NGX_CONF_UNSET;
365 ccf->user = (ngx_uid_t) NGX_CONF_UNSET; 369 ccf->user = (ngx_uid_t) NGX_CONF_UNSET;
366 ccf->group = (ngx_gid_t) NGX_CONF_UNSET; 370 ccf->group = (ngx_gid_t) NGX_CONF_UNSET;
367 371
368 ((void **)(cycle->conf_ctx))[ngx_core_module.index] = ccf; 372 ((void **)(cycle->conf_ctx))[ngx_core_module.index] = ccf;
369 373