# HG changeset patch # User Igor Sysoev # Date 1075926608 0 # Node ID c31c40540318f2f3b14f37fbe9b15409d47d9636 # Parent 1903c682195810ba07aed961de6639a4044c3b9e nginx-0.0.2-2004-02-04-23:30:08 import diff -r 1903c6821958 -r c31c40540318 src/core/nginx.c --- a/src/core/nginx.c Tue Feb 03 20:27:11 2004 +0000 +++ b/src/core/nginx.c Wed Feb 04 20:30:08 2004 +0000 @@ -221,7 +221,7 @@ } -/* TODO: broken single process */ +/* TODO: broken NGX_PROCESS_SINGLE */ static void ngx_master_process_cycle(ngx_cycle_t *cycle, ngx_master_ctx_t *ctx) { @@ -634,6 +634,12 @@ ngx_log_debug0(NGX_LOG_DEBUG_EVENT, cycle->log, 0, "worker cycle"); ngx_process_events(cycle->log); + + if (ngx_reopen) { + ngx_log_error(NGX_LOG_INFO, cycle->log, 0, "reopen logs"); + ngx_reopen_files(cycle, -1); + ngx_reopen = 0; + } } } diff -r 1903c6821958 -r c31c40540318 src/event/modules/ngx_poll_module.c --- a/src/event/modules/ngx_poll_module.c Tue Feb 03 20:27:11 2004 +0000 +++ b/src/event/modules/ngx_poll_module.c Wed Feb 04 20:30:08 2004 +0000 @@ -312,6 +312,13 @@ event_list[i].events, event_list[i].revents); } + if (event_list[i].fd == -1) { + + /* the disabled event, workaround for our possible bug */ + + continue; + } + c = &ngx_cycle->connections[event_list[i].fd]; if (c->fd == -1) { diff -r 1903c6821958 -r c31c40540318 src/os/unix/ngx_posix_init.c --- a/src/os/unix/ngx_posix_init.c Tue Feb 03 20:27:11 2004 +0000 +++ b/src/os/unix/ngx_posix_init.c Wed Feb 04 20:30:08 2004 +0000 @@ -144,14 +144,9 @@ break; case ngx_signal_value(NGX_REOPEN_SIGNAL): - if (ngx_noaccept) { - action = ", ignoring"; - - } else { - ngx_reopen = 1; - action = ", reopen logs"; - break; - } + ngx_reopen = 1; + action = ", reopen logs"; + break; case ngx_signal_value(NGX_CHANGEBIN_SIGNAL): if ((ngx_inherited && getppid() > 1)