Mercurial > hg > nginx
diff src/core/nginx.c @ 317:1308b98496a2
nginx-0.0.3-2004-04-15-19:34:36 import
author | Igor Sysoev <igor@sysoev.ru> |
---|---|
date | Thu, 15 Apr 2004 15:34:36 +0000 |
parents | a0beefedaf94 |
children | 56496082668b |
line wrap: on
line diff
--- a/src/core/nginx.c Wed Apr 14 20:34:05 2004 +0000 +++ b/src/core/nginx.c Thu Apr 15 15:34:36 2004 +0000 @@ -70,12 +70,14 @@ }; -ngx_int_t ngx_max_module; +ngx_int_t ngx_max_module; -ngx_int_t ngx_process; -ngx_pid_t ngx_pid; -ngx_pid_t ngx_new_binary; -ngx_int_t ngx_inherited; +ngx_int_t ngx_process; +ngx_pid_t ngx_pid; +ngx_pid_t ngx_new_binary; +ngx_int_t ngx_inherited; + +ngx_uint_t ngx_test_config; int main(int argc, char *const *argv) @@ -125,11 +127,6 @@ return 1; } - ngx_max_module = 0; - for (i = 0; ngx_modules[i]; i++) { - ngx_modules[i]->index = ngx_max_module++; - } - if (!(init_cycle.pool = ngx_create_pool(1024, log))) { return 1; } @@ -138,11 +135,20 @@ return 1; } + ngx_max_module = 0; + for (i = 0; ngx_modules[i]; i++) { + ngx_modules[i]->index = ngx_max_module++; + } + cycle = ngx_init_cycle(&init_cycle); if (cycle == NULL) { return 1; } + if (ngx_test_config) { + return 0; + } + ngx_cycle = cycle; ccf = (ngx_core_conf_t *) ngx_get_conf(cycle->conf_ctx, ngx_core_module); @@ -276,6 +282,10 @@ switch (ctx->argv[i][1]) { + case 't': + ngx_test_config = 1; + break; + case 'c': if (ctx->argv[i + 1] == NULL) { ngx_log_error(NGX_LOG_EMERG, cycle->log, 0,