comparison src/core/nginx.c @ 318:56496082668b

nginx-0.0.3-2004-04-16-09:14:16 import
author Igor Sysoev <igor@sysoev.ru>
date Fri, 16 Apr 2004 05:14:16 +0000
parents 1308b98496a2
children d621239c30f7
comparison
equal deleted inserted replaced
317:1308b98496a2 318:56496082668b
75 ngx_int_t ngx_process; 75 ngx_int_t ngx_process;
76 ngx_pid_t ngx_pid; 76 ngx_pid_t ngx_pid;
77 ngx_pid_t ngx_new_binary; 77 ngx_pid_t ngx_new_binary;
78 ngx_int_t ngx_inherited; 78 ngx_int_t ngx_inherited;
79 79
80 ngx_uint_t ngx_test_config;
81
82 80
83 int main(int argc, char *const *argv) 81 int main(int argc, char *const *argv)
84 { 82 {
85 ngx_int_t i; 83 ngx_int_t i;
86 ngx_log_t *log; 84 ngx_log_t *log;
144 if (cycle == NULL) { 142 if (cycle == NULL) {
145 return 1; 143 return 1;
146 } 144 }
147 145
148 if (ngx_test_config) { 146 if (ngx_test_config) {
147 ngx_log_error(NGX_LOG_INFO, cycle->log, 0, "config syntax is ok");
149 return 0; 148 return 0;
150 } 149 }
151 150
152 ngx_cycle = cycle; 151 ngx_cycle = cycle;
153 152
179 return 1; 178 return 1;
180 } 179 }
181 180
182 #endif 181 #endif
183 182
184 ngx_master_process_cycle(cycle, &ctx); 183 if (ngx_process == NGX_PROCESS_MASTER) {
184 ngx_master_process_cycle(cycle, &ctx);
185
186 } else {
187 ngx_single_process_cycle(cycle, &ctx);
188 }
185 189
186 return 0; 190 return 0;
187 } 191 }
188 192
189 193