comparison src/core/ngx_cycle.c @ 496:116d5de7cbb6 NGINX_0_7_60

nginx 0.7.60 *) Feature: the "updating" parameter in "proxy_cache_use_stale" and "fastcgi_cache_use_stale" directives. *) Feature: the "keepalive_requests" directive. *) Bugfix: in open_file_cache and proxy/fastcgi cache interaction on start up. *) Bugfix: open_file_cache might cache open file descriptors too long. *) Bugfix: the "If-Modified-Since", "If-Range", etc. client request header lines were passed to backend while caching if no "proxy_set_header" directive was used with any parameters. *) Bugfix: the "Set-Cookie" and "P3P" response header lines were not hidden while caching if no "proxy_hide_header/fastcgi_hide_header" directives were used with any parameters. *) Bugfix: the ngx_http_image_filter_module did not support GIF87a format. Thanks to Denis Ilyinyh. *) Bugfix: nginx could not be built modules on Solaris 10 and early; the bug had appeared in 0.7.56. *) Bugfix: XLST filter did not work in subrequests. *) Bugfix: in relative paths handling in nginx/Windows. *) Bugfix: in proxy_store, fastcgi_store, proxy_cache, and fastcgi_cache in nginx/Windows.
author Igor Sysoev <http://sysoev.ru>
date Mon, 15 Jun 2009 00:00:00 +0400
parents 6484cbba0222
children 89dc5654117c
comparison
equal deleted inserted replaced
495:6d9fb4461113 496:116d5de7cbb6
267 if (ngx_test_config) { 267 if (ngx_test_config) {
268 ngx_log_stderr(0, "the configuration file %s syntax is ok", 268 ngx_log_stderr(0, "the configuration file %s syntax is ok",
269 cycle->conf_file.data); 269 cycle->conf_file.data);
270 } 270 }
271 271
272
273 for (i = 0; ngx_modules[i]; i++) { 272 for (i = 0; ngx_modules[i]; i++) {
274 if (ngx_modules[i]->type != NGX_CORE_MODULE) { 273 if (ngx_modules[i]->type != NGX_CORE_MODULE) {
275 continue; 274 continue;
276 } 275 }
277 276
285 return NULL; 284 return NULL;
286 } 285 }
287 } 286 }
288 } 287 }
289 288
289 if (ngx_process == NGX_PROCESS_SIGNALLER) {
290 return cycle;
291 }
290 292
291 ccf = (ngx_core_conf_t *) ngx_get_conf(cycle->conf_ctx, ngx_core_module); 293 ccf = (ngx_core_conf_t *) ngx_get_conf(cycle->conf_ctx, ngx_core_module);
292 294
293 if (ngx_test_config) { 295 if (ngx_test_config) {
294 296
461 463
462 if (ngx_shm_alloc(&shm_zone[i].shm) != NGX_OK) { 464 if (ngx_shm_alloc(&shm_zone[i].shm) != NGX_OK) {
463 goto failed; 465 goto failed;
464 } 466 }
465 467
466 if (!shm_zone[i].shm.exists) { 468 if (ngx_init_zone_pool(cycle, &shm_zone[i]) != NGX_OK) {
467 469 goto failed;
468 if (ngx_init_zone_pool(cycle, &shm_zone[i]) != NGX_OK) {
469 goto failed;
470 }
471 } 470 }
472 471
473 if (shm_zone[i].init(&shm_zone[i], NULL) != NGX_OK) { 472 if (shm_zone[i].init(&shm_zone[i], NULL) != NGX_OK) {
474 goto failed; 473 goto failed;
475 } 474 }
565 } 564 }
566 #endif 565 #endif
567 } 566 }
568 } 567 }
569 568
570 if (ngx_process != NGX_PROCESS_SIGNALLER) { 569 if (ngx_open_listening_sockets(cycle) != NGX_OK) {
571 if (ngx_open_listening_sockets(cycle) != NGX_OK) { 570 goto failed;
572 goto failed; 571 }
573 } 572
574 573 if (!ngx_test_config) {
575 if (!ngx_test_config) { 574 ngx_configure_listening_sockets(cycle);
576 ngx_configure_listening_sockets(cycle);
577 }
578 } 575 }
579 576
580 577
581 /* commit the new cycle configuration */ 578 /* commit the new cycle configuration */
582 579
654 651
655 /* close the unnecessary listening sockets */ 652 /* close the unnecessary listening sockets */
656 653
657 ls = old_cycle->listening.elts; 654 ls = old_cycle->listening.elts;
658 for (i = 0; i < old_cycle->listening.nelts; i++) { 655 for (i = 0; i < old_cycle->listening.nelts; i++) {
659 if (ls[i].remain) { 656
657 if (ls[i].remain || ls[i].fd == -1) {
660 continue; 658 continue;
661 } 659 }
662 660
663 if (ngx_close_socket(ls[i].fd) == -1) { 661 if (ngx_close_socket(ls[i].fd) == -1) {
664 ngx_log_error(NGX_LOG_EMERG, log, ngx_socket_errno, 662 ngx_log_error(NGX_LOG_EMERG, log, ngx_socket_errno,
883 u_char *file; 881 u_char *file;
884 ngx_slab_pool_t *sp; 882 ngx_slab_pool_t *sp;
885 883
886 sp = (ngx_slab_pool_t *) zn->shm.addr; 884 sp = (ngx_slab_pool_t *) zn->shm.addr;
887 885
886 if (zn->shm.exists) {
887
888 if (sp == sp->addr) {
889 return NGX_OK;
890 }
891
892 ngx_log_error(NGX_LOG_EMERG, cycle->log, 0,
893 "shared zone \"%V\" has no equal addresses: %p vs %p",
894 &zn->shm.name, sp->addr, sp);
895 return NGX_ERROR;
896 }
897
888 sp->end = zn->shm.addr + zn->shm.size; 898 sp->end = zn->shm.addr + zn->shm.size;
889 sp->min_shift = 3; 899 sp->min_shift = 3;
900 sp->addr = zn->shm.addr;
890 901
891 #if (NGX_HAVE_ATOMIC_OPS) 902 #if (NGX_HAVE_ATOMIC_OPS)
892 903
893 file = NULL; 904 file = NULL;
894 905