comparison src/core/nginx.c @ 366:e411b1482ee3

nginx-0.0.7-2004-06-23-19:18:17 import
author Igor Sysoev <igor@sysoev.ru>
date Wed, 23 Jun 2004 15:18:17 +0000
parents 4feff829a849
children d0451e402e27
comparison
equal deleted inserted replaced
365:fd24ba70e1b3 366:e411b1482ee3
70 }; 70 };
71 71
72 72
73 ngx_uint_t ngx_max_module; 73 ngx_uint_t ngx_max_module;
74 74
75 ngx_uint_t ngx_inherited;
76
77 75
78 int main(int argc, char *const *argv) 76 int main(int argc, char *const *argv)
79 { 77 {
80 ngx_int_t i; 78 ngx_int_t i;
81 ngx_log_t *log; 79 ngx_log_t *log;
160 ngx_process = ccf->master ? NGX_PROCESS_MASTER : NGX_PROCESS_SINGLE; 158 ngx_process = ccf->master ? NGX_PROCESS_MASTER : NGX_PROCESS_SINGLE;
161 159
162 #if (WIN32) 160 #if (WIN32)
163 161
164 #if 0 162 #if 0
163
164 TODO:
165
165 if (ccf->run_as_service) { 166 if (ccf->run_as_service) {
166 if (ngx_service(cycle->log) == NGX_ERROR) { 167 if (ngx_service(cycle->log) == NGX_ERROR) {
167 return 1; 168 return 1;
168 } 169 }
169 170
175 176
176 if (!ngx_inherited && ccf->daemon) { 177 if (!ngx_inherited && ccf->daemon) {
177 if (ngx_daemon(cycle->log) == NGX_ERROR) { 178 if (ngx_daemon(cycle->log) == NGX_ERROR) {
178 return 1; 179 return 1;
179 } 180 }
181
182 ngx_daemonized = 1;
180 } 183 }
181 184
182 if (ngx_create_pidfile(cycle, NULL) == NGX_ERROR) { 185 if (ngx_create_pidfile(cycle, NULL) == NGX_ERROR) {
183 return 1; 186 return 1;
184 } 187 }