Mercurial > hg > nginx-quic
diff src/os/unix/ngx_process_cycle.c @ 531:c3bd8cdabb8f release-0.1.40
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.
author | Igor Sysoev <igor@sysoev.ru> |
---|---|
date | Mon, 25 Jul 2005 09:41:38 +0000 |
parents | 2019117e6b38 |
children | 563ad09abf50 |
line wrap: on
line diff
--- a/src/os/unix/ngx_process_cycle.c +++ b/src/os/unix/ngx_process_cycle.c @@ -7,7 +7,6 @@ #include <ngx_config.h> #include <ngx_core.h> #include <ngx_event.h> -#include <ngx_setproctitle.h> #include <ngx_channel.h> @@ -69,11 +68,13 @@ ngx_master_process_cycle(ngx_cycle_t *cy 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 *cy 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; }