Mercurial > hg > nginx
diff src/core/nginx.c @ 45:f1ee46c036a4
nginx-0.0.1-2003-01-10-09:09:20 import
author | Igor Sysoev <igor@sysoev.ru> |
---|---|
date | Fri, 10 Jan 2003 06:09:20 +0000 |
parents | 0e81ac0bb3e2 |
children | 6b13b1cadabe |
line wrap: on
line diff
--- a/src/core/nginx.c Thu Jan 09 05:36:00 2003 +0000 +++ b/src/core/nginx.c Fri Jan 10 06:09:20 2003 +0000 @@ -3,6 +3,7 @@ #include <ngx_config.h> +#include <ngx_core.h> #include <ngx_string.h> #include <ngx_errno.h> #include <ngx_time.h> @@ -41,6 +42,7 @@ int main(int argc, char *const *argv) { + int i; ngx_str_t conf_file; ngx_conf_t conf; @@ -70,9 +72,18 @@ conf_file.data = "nginx.conf"; if (ngx_conf_parse(&conf, &conf_file) != NGX_CONF_OK) { - exit(1); + return 1; } + for (i = 0; ngx_modules[i]; i++) { + if (ngx_modules[i]->init_module) { + if (ngx_modules[i]->init_module(ngx_pool) == NGX_ERROR) { + return 1; + } + } + } + + #if 0 /* STUB */ /* TODO: init chain of global modules (like ngx_http.c),