Mercurial > hg > nginx-quic
comparison 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 |
comparison
equal
deleted
inserted
replaced
87:5f6d848dcbef | 88:674d333f4296 |
---|---|
2 #include <nginx.h> | 2 #include <nginx.h> |
3 | 3 |
4 #include <ngx_config.h> | 4 #include <ngx_config.h> |
5 | 5 |
6 #include <ngx_core.h> | 6 #include <ngx_core.h> |
7 #include <ngx_os_init.h> | |
7 #include <ngx_string.h> | 8 #include <ngx_string.h> |
8 #include <ngx_errno.h> | 9 #include <ngx_errno.h> |
9 #include <ngx_time.h> | 10 #include <ngx_time.h> |
10 #include <ngx_log.h> | 11 #include <ngx_log.h> |
11 #include <ngx_alloc.h> | 12 #include <ngx_alloc.h> |
50 ngx_conf_t conf; | 51 ngx_conf_t conf; |
51 | 52 |
52 /* STUB */ | 53 /* STUB */ |
53 ngx_log.log_level = NGX_LOG_DEBUG; | 54 ngx_log.log_level = NGX_LOG_DEBUG; |
54 | 55 |
56 if (ngx_os_init(&ngx_log) == NGX_ERROR) { | |
57 exit(1); | |
58 } | |
59 | |
55 ngx_pool = ngx_create_pool(16 * 1024, &ngx_log); | 60 ngx_pool = ngx_create_pool(16 * 1024, &ngx_log); |
56 /* */ | 61 /* */ |
57 | 62 |
58 #if (WIN32) | 63 #if (WIN32) |
59 | 64 |
63 | 68 |
64 #else | 69 #else |
65 | 70 |
66 ngx_set_signals(&ngx_log); | 71 ngx_set_signals(&ngx_log); |
67 | 72 |
68 #endif | |
69 | |
70 #if 0 | |
71 if (ngx_os_init(&ngx_log) == NGX_ERROR) { | |
72 exit(1); | |
73 } | |
74 #endif | 73 #endif |
75 | 74 |
76 ngx_init_array(ngx_listening_sockets, ngx_pool, 10, sizeof(ngx_listen_t), | 75 ngx_init_array(ngx_listening_sockets, ngx_pool, 10, sizeof(ngx_listen_t), |
77 1); | 76 1); |
78 | 77 |
84 ngx_memzero(&conf, sizeof(ngx_conf_t)); | 83 ngx_memzero(&conf, sizeof(ngx_conf_t)); |
85 ngx_test_null(conf.args, | 84 ngx_test_null(conf.args, |
86 ngx_create_array(ngx_pool, 10, sizeof(ngx_str_t)), 1); | 85 ngx_create_array(ngx_pool, 10, sizeof(ngx_str_t)), 1); |
87 conf.pool = ngx_pool; | 86 conf.pool = ngx_pool; |
88 conf.log = &ngx_log; | 87 conf.log = &ngx_log; |
89 conf.type = NGX_CORE_MODULE_TYPE; | 88 conf.module_type = NGX_CORE_MODULE_TYPE; |
89 conf.cmd_type = NGX_MAIN_CONF; | |
90 | 90 |
91 conf_file.len = sizeof("nginx.conf") - 1; | 91 conf_file.len = sizeof("nginx.conf") - 1; |
92 conf_file.data = "nginx.conf"; | 92 conf_file.data = "nginx.conf"; |
93 | 93 |
94 if (ngx_conf_parse(&conf, &conf_file) != NGX_CONF_OK) { | 94 if (ngx_conf_parse(&conf, &conf_file) != NGX_CONF_OK) { |