mirror of
https://github.com/nginx/nginx.git
synced 2024-12-24 08:00:14 -06:00
Fixed SIGQUIT not removing listening UNIX sockets (closes #753).
Listening UNIX sockets were not removed on graceful shutdown, preventing the next runs. The fix is to replace the custom socket closing code in ngx_master_process_cycle() by the ngx_close_listening_sockets() call.
This commit is contained in:
parent
da370de990
commit
9c3ac44de2
@ -77,12 +77,11 @@ ngx_master_process_cycle(ngx_cycle_t *cycle)
|
||||
u_char *p;
|
||||
size_t size;
|
||||
ngx_int_t i;
|
||||
ngx_uint_t n, sigio;
|
||||
ngx_uint_t sigio;
|
||||
sigset_t set;
|
||||
struct itimerval itv;
|
||||
ngx_uint_t live;
|
||||
ngx_msec_t delay;
|
||||
ngx_listening_t *ls;
|
||||
ngx_core_conf_t *ccf;
|
||||
|
||||
sigemptyset(&set);
|
||||
@ -204,16 +203,7 @@ 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;
|
||||
ngx_close_listening_sockets(cycle);
|
||||
|
||||
continue;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user