Mercurial > hg > nginx-quic
comparison src/core/ngx_cycle.c @ 320:d621239c30f7
nginx-0.0.3-2004-04-18-23:06:02 import
author | Igor Sysoev <igor@sysoev.ru> |
---|---|
date | Sun, 18 Apr 2004 19:06:02 +0000 |
parents | 56496082668b |
children | be40e9893a19 |
comparison
equal
deleted
inserted
replaced
319:7a8ebba985a9 | 320:d621239c30f7 |
---|---|
136 if (ngx_conf_parse(&conf, &cycle->conf_file) != NGX_CONF_OK) { | 136 if (ngx_conf_parse(&conf, &cycle->conf_file) != NGX_CONF_OK) { |
137 ngx_destroy_pool(pool); | 137 ngx_destroy_pool(pool); |
138 return NULL; | 138 return NULL; |
139 } | 139 } |
140 | 140 |
141 if (ngx_test_config) { | |
142 ngx_log_error(NGX_LOG_INFO, log, 0, | |
143 "the configuration file %s syntax is ok", | |
144 cycle->conf_file.data); | |
145 } | |
146 | |
141 | 147 |
142 for (i = 0; ngx_modules[i]; i++) { | 148 for (i = 0; ngx_modules[i]; i++) { |
143 if (ngx_modules[i]->type != NGX_CORE_MODULE) { | 149 if (ngx_modules[i]->type != NGX_CORE_MODULE) { |
144 continue; | 150 continue; |
145 } | 151 } |
272 } | 278 } |
273 } | 279 } |
274 | 280 |
275 #if !(WIN32) | 281 #if !(WIN32) |
276 | 282 |
277 if (dup2(cycle->log->file->fd, STDERR_FILENO) == NGX_ERROR) { | 283 if (!failed && !ngx_test_config) { |
278 ngx_log_error(NGX_LOG_EMERG, log, ngx_errno, | 284 if (dup2(cycle->log->file->fd, STDERR_FILENO) == NGX_ERROR) { |
279 "dup2(STDERR) failed"); | 285 ngx_log_error(NGX_LOG_EMERG, log, ngx_errno, |
280 failed = 1; | 286 "dup2(STDERR) failed"); |
287 failed = 1; | |
288 } | |
281 } | 289 } |
282 | 290 |
283 #endif | 291 #endif |
284 | 292 |
285 if (failed) { | 293 if (failed) { |
295 if (ngx_close_file(file[i].fd) == NGX_FILE_ERROR) { | 303 if (ngx_close_file(file[i].fd) == NGX_FILE_ERROR) { |
296 ngx_log_error(NGX_LOG_EMERG, log, ngx_errno, | 304 ngx_log_error(NGX_LOG_EMERG, log, ngx_errno, |
297 ngx_close_file_n " \"%s\" failed", | 305 ngx_close_file_n " \"%s\" failed", |
298 file[i].name.data); | 306 file[i].name.data); |
299 } | 307 } |
308 } | |
309 | |
310 if (ngx_test_config) { | |
311 ngx_destroy_pool(pool); | |
312 return NULL; | |
300 } | 313 } |
301 | 314 |
302 ls = cycle->listening.elts; | 315 ls = cycle->listening.elts; |
303 for (i = 0; i < cycle->listening.nelts; i++) { | 316 for (i = 0; i < cycle->listening.nelts; i++) { |
304 if (ls[i].new && ls[i].fd == -1) { | 317 if (ls[i].new && ls[i].fd == -1) { |