From 90c081478175a94a995f8b4341c968c0395161b1 Mon Sep 17 00:00:00 2001 From: Igor Sysoev Date: Mon, 25 Jul 2005 09:41:38 +0000 Subject: nginx-0.1.40-RELEASE import *) Bugfix: if a client sent too long header line, then the request information did not logged in the error log. *) Bugfix: the "Set-Cookie" header line was not transferred when the "X-Accel-Redirect" was used; the bug had appeared in 0.1.39. *) Bugfix: the "Content-Disposition" header line was not transferred when the "X-Accel-Redirect" was used. *) Bugfix: the master process did not close the listen socket on the SIGQUIT signal. *) Bugfix: after on-line upgrade on Linux and Solaris the process name became shorter in the "ps" command. --- src/os/unix/ngx_process_cycle.c | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) (limited to 'src/os/unix/ngx_process_cycle.c') diff --git a/src/os/unix/ngx_process_cycle.c b/src/os/unix/ngx_process_cycle.c index d3c92a1b6..9d0569411 100644 --- a/src/os/unix/ngx_process_cycle.c +++ b/src/os/unix/ngx_process_cycle.c @@ -7,7 +7,6 @@ #include #include #include -#include #include @@ -69,11 +68,13 @@ ngx_master_process_cycle(ngx_cycle_t *cycle) u_char *p; size_t size; ngx_int_t i; + ngx_uint_t n; sigset_t set; struct timeval tv; struct itimerval itv; ngx_uint_t live; ngx_msec_t delay; + ngx_listening_t *ls; ngx_core_conf_t *ccf; sigemptyset(&set); @@ -179,6 +180,17 @@ ngx_master_process_cycle(ngx_cycle_t *cycle) if (ngx_quit) { ngx_signal_worker_processes(cycle, ngx_signal_value(NGX_SHUTDOWN_SIGNAL)); + + ls = cycle->listening.elts; + for (n = 0; n < cycle->listening.nelts; n++) { + if (ngx_close_socket(ls[n].fd) == -1) { + ngx_log_error(NGX_LOG_EMERG, cycle->log, ngx_socket_errno, + ngx_close_socket_n " %V failed", + &ls[n].addr_text); + } + } + cycle->listening.nelts = 0; + continue; } -- cgit