comparison src/core/ngx_cycle.c @ 86:962c43960644 NGINX_0_1_43

nginx 0.1.43 *) Feature: the listen(2) backlog in the "listen" directive can be changed using the -HUP signal. *) Feature: the geo2nginx.pl script was added to contrib. *) Change: the FastCGI parameters with the empty values now are passed to a server. *) Bugfix: the segmentation fault occurred or the worker process may got caught in an endless loop if the proxied or FastCGI server sent the "Cache-Control" header line and the "expires" directive was used; in the proxied mode the bug appeared in 0.1.29.
author Igor Sysoev <http://sysoev.ru>
date Tue, 30 Aug 2005 00:00:00 +0400
parents 77969b24f355
children 45945fa8b8ba
comparison
equal deleted inserted replaced
85:ed21d13ec23c 86:962c43960644
337 337
338 nls[n].fd = ls[i].fd; 338 nls[n].fd = ls[i].fd;
339 nls[n].remain = 1; 339 nls[n].remain = 1;
340 ls[i].remain = 1; 340 ls[i].remain = 1;
341 341
342 if (ls[n].backlog != nls[i].backlog) {
343 nls[n].change_backlog = 1;
344 }
345
342 #if (NGX_HAVE_DEFERRED_ACCEPT && defined SO_ACCEPTFILTER) 346 #if (NGX_HAVE_DEFERRED_ACCEPT && defined SO_ACCEPTFILTER)
343 347
344 /* 348 /*
345 * FreeBSD, except the most recent versions, 349 * FreeBSD, except the most recent versions,
346 * can not remove accept filter 350 * can not remove accept filter
403 if (!ngx_test_config && !failed) { 407 if (!ngx_test_config && !failed) {
404 if (ngx_open_listening_sockets(cycle) == NGX_ERROR) { 408 if (ngx_open_listening_sockets(cycle) == NGX_ERROR) {
405 failed = 1; 409 failed = 1;
406 } 410 }
407 411
408 #if (NGX_HAVE_DEFERRED_ACCEPT)
409
410 if (!failed) { 412 if (!failed) {
411 ls = cycle->listening.elts; 413 ls = cycle->listening.elts;
412 for (i = 0; i < cycle->listening.nelts; i++) { 414 for (i = 0; i < cycle->listening.nelts; i++) {
415
416 if (ls[i].change_backlog) {
417 if (listen(ls[i].fd, ls[i].backlog) == -1) {
418 ngx_log_error(NGX_LOG_ALERT, log, ngx_socket_errno,
419 "changing the listen() backlog to %d "
420 "for %V failed, ignored",
421 &ls[i].addr_text, ls[i].backlog);
422 }
423 }
424
425 #if (NGX_HAVE_DEFERRED_ACCEPT)
413 426
414 #ifdef SO_ACCEPTFILTER 427 #ifdef SO_ACCEPTFILTER
415 if (ls[i].delete_deferred) { 428 if (ls[i].delete_deferred) {
416 if (setsockopt(ls[i].fd, SOL_SOCKET, SO_ACCEPTFILTER, 429 if (setsockopt(ls[i].fd, SOL_SOCKET, SO_ACCEPTFILTER,
417 NULL, 0) == -1) 430 NULL, 0) == -1)
474 487
475 if (ls[i].add_deferred) { 488 if (ls[i].add_deferred) {
476 ls[i].deferred_accept = 1; 489 ls[i].deferred_accept = 1;
477 } 490 }
478 #endif 491 #endif
492 #endif
479 } 493 }
480 } 494 }
481 #endif
482 } 495 }
483 } 496 }
484 497
485 if (failed) { 498 if (failed) {
486 499