diff src/core/nginx.c @ 88:674d333f4296

nginx-0.0.1-2003-05-14-21:13:13 import
author Igor Sysoev <igor@sysoev.ru>
date Wed, 14 May 2003 17:13:13 +0000
parents 5f6d848dcbef
children 37530da31268
line wrap: on
line diff
--- a/src/core/nginx.c
+++ b/src/core/nginx.c
@@ -4,6 +4,7 @@
 #include <ngx_config.h>
 
 #include <ngx_core.h>
+#include <ngx_os_init.h>
 #include <ngx_string.h>
 #include <ngx_errno.h>
 #include <ngx_time.h>
@@ -52,6 +53,10 @@ int main(int argc, char *const *argv)
     /* STUB */
     ngx_log.log_level = NGX_LOG_DEBUG;
 
+    if (ngx_os_init(&ngx_log) == NGX_ERROR) {
+        exit(1);
+    }
+
     ngx_pool = ngx_create_pool(16 * 1024, &ngx_log);
     /* */
 
@@ -67,12 +72,6 @@ int main(int argc, char *const *argv)
 
 #endif
 
-#if 0
-    if (ngx_os_init(&ngx_log) == NGX_ERROR) {
-        exit(1);
-    }
-#endif
-
     ngx_init_array(ngx_listening_sockets, ngx_pool, 10, sizeof(ngx_listen_t),
                    1);
 
@@ -86,7 +85,8 @@ int main(int argc, char *const *argv)
                   ngx_create_array(ngx_pool, 10, sizeof(ngx_str_t)), 1);
     conf.pool = ngx_pool;
     conf.log = &ngx_log;
-    conf.type = NGX_CORE_MODULE_TYPE;
+    conf.module_type = NGX_CORE_MODULE_TYPE;
+    conf.cmd_type = NGX_MAIN_CONF;
 
     conf_file.len = sizeof("nginx.conf") - 1;
     conf_file.data = "nginx.conf";