diff options
author | Igor Sysoev <igor@sysoev.ru> | 2003-01-10 06:09:20 +0000 |
---|---|---|
committer | Igor Sysoev <igor@sysoev.ru> | 2003-01-10 06:09:20 +0000 |
commit | b2620634c5c395f227a98837f46e1eaf6b86963c (patch) | |
tree | d9333eef73b09e7351cdc8705df984786a5544b3 /src/core/nginx.c | |
parent | 4e9393a0548d783cd6f50d1fcd003c85a24b2b16 (diff) | |
download | nginx-b2620634c5c395f227a98837f46e1eaf6b86963c.tar.gz nginx-b2620634c5c395f227a98837f46e1eaf6b86963c.zip |
nginx-0.0.1-2003-01-10-09:09:20 import
Diffstat (limited to 'src/core/nginx.c')
-rw-r--r-- | src/core/nginx.c | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/src/core/nginx.c b/src/core/nginx.c index ead14530a..5652e4167 100644 --- a/src/core/nginx.c +++ b/src/core/nginx.c @@ -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 @@ ngx_array_t ngx_listening_sockets; int main(int argc, char *const *argv) { + int i; ngx_str_t conf_file; ngx_conf_t conf; @@ -70,9 +72,18 @@ int main(int argc, char *const *argv) 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), |