Mercurial > hg > nginx-mail
comparison src/core/ngx_cycle.c @ 4:4b2dafa26fe2 NGINX_0_1_2
nginx 0.1.2
*) Feature: the --user=USER, --group=GROUP, and --with-ld-opt=OPTIONS
options in configure.
*) Feature: the server_name directive supports *.domain.tld.
*) Bugfix: the portability improvements.
*) Bugfix: if configuration file was set in command line, the
reconfiguration was impossible; bug appeared in 0.1.1.
*) Bugfix: proxy module may get caught in an endless loop when sendfile
is not used.
*) Bugfix: with sendfile the response was not recoded according to the
charset module directives; bug appeared in 0.1.1.
*) Bugfix: very seldom bug in the kqueue processing.
*) Bugfix: the gzip module compressed the proxied responses that was
already compressed.
author | Igor Sysoev <http://sysoev.ru> |
---|---|
date | Thu, 21 Oct 2004 00:00:00 +0400 |
parents | cc9f381affaa |
children | 46833bd150cb |
comparison
equal
deleted
inserted
replaced
3:8beaf7b3241f | 4:4b2dafa26fe2 |
---|---|
156 conf.pool = pool; | 156 conf.pool = pool; |
157 conf.log = log; | 157 conf.log = log; |
158 conf.module_type = NGX_CORE_MODULE; | 158 conf.module_type = NGX_CORE_MODULE; |
159 conf.cmd_type = NGX_MAIN_CONF; | 159 conf.cmd_type = NGX_MAIN_CONF; |
160 | 160 |
161 #if 0 | |
162 log->log_level = NGX_LOG_DEBUG_ALL; | |
163 #endif | |
161 | 164 |
162 if (ngx_conf_parse(&conf, &cycle->conf_file) != NGX_CONF_OK) { | 165 if (ngx_conf_parse(&conf, &cycle->conf_file) != NGX_CONF_OK) { |
163 ngx_destroy_pool(pool); | 166 ngx_destroy_pool(pool); |
164 return NULL; | 167 return NULL; |
165 } | 168 } |
221 | 224 |
222 file[i].fd = ngx_open_file(file[i].name.data, | 225 file[i].fd = ngx_open_file(file[i].name.data, |
223 NGX_FILE_RDWR, | 226 NGX_FILE_RDWR, |
224 NGX_FILE_CREATE_OR_OPEN|NGX_FILE_APPEND); | 227 NGX_FILE_CREATE_OR_OPEN|NGX_FILE_APPEND); |
225 | 228 |
226 #if 0 | |
227 log->log_level = NGX_LOG_DEBUG_ALL; | |
228 #endif | |
229 ngx_log_debug3(NGX_LOG_DEBUG_CORE, log, 0, | 229 ngx_log_debug3(NGX_LOG_DEBUG_CORE, log, 0, |
230 "log: %0X %d \"%s\"", | 230 "log: %0X %d \"%s\"", |
231 &file[i], file[i].fd, file[i].name.data); | 231 &file[i], file[i].fd, file[i].name.data); |
232 | 232 |
233 if (file[i].fd == NGX_INVALID_FILE) { | 233 if (file[i].fd == NGX_INVALID_FILE) { |
308 break; | 308 break; |
309 } | 309 } |
310 } | 310 } |
311 | 311 |
312 if (nls[n].fd == -1) { | 312 if (nls[n].fd == -1) { |
313 nls[n].new = 1; | 313 nls[n].open = 1; |
314 } | 314 } |
315 } | 315 } |
316 | 316 |
317 } else { | 317 } else { |
318 ls = cycle->listening.elts; | 318 ls = cycle->listening.elts; |
319 for (i = 0; i < cycle->listening.nelts; i++) { | 319 for (i = 0; i < cycle->listening.nelts; i++) { |
320 ls[i].new = 1; | 320 ls[i].open = 1; |
321 } | 321 } |
322 } | 322 } |
323 | 323 |
324 if (!ngx_test_config && !failed) { | 324 if (!ngx_test_config && !failed) { |
325 if (ngx_open_listening_sockets(cycle) == NGX_ERROR) { | 325 if (ngx_open_listening_sockets(cycle) == NGX_ERROR) { |
364 return NULL; | 364 return NULL; |
365 } | 365 } |
366 | 366 |
367 ls = cycle->listening.elts; | 367 ls = cycle->listening.elts; |
368 for (i = 0; i < cycle->listening.nelts; i++) { | 368 for (i = 0; i < cycle->listening.nelts; i++) { |
369 if (ls[i].fd == -1 || !ls[i].new) { | 369 if (ls[i].fd == -1 || !ls[i].open) { |
370 continue; | 370 continue; |
371 } | 371 } |
372 | 372 |
373 if (ngx_close_socket(ls[i].fd) == -1) { | 373 if (ngx_close_socket(ls[i].fd) == -1) { |
374 ngx_log_error(NGX_LOG_EMERG, log, ngx_socket_errno, | 374 ngx_log_error(NGX_LOG_EMERG, log, ngx_socket_errno, |