commit | e7138540d603336a0f2187d8cf20d24b54ed265e | [log] [tgz] |
---|---|---|
author | Igor Sysoev <igor@sysoev.ru> | Fri Oct 09 14:43:09 2009 +0000 |
committer | Igor Sysoev <igor@sysoev.ru> | Fri Oct 09 14:43:09 2009 +0000 |
tree | b6bfc769777935beea54afe42db53c18992e4331 | |
parent | 671236993ac3c7e90e76fca8a8d988419686c555 [diff] |
nginx did not close log file set by --error-log-path, the bug was introduced in r2744
diff --git a/src/core/nginx.c b/src/core/nginx.c index eaae62e..29eee6a 100644 --- a/src/core/nginx.c +++ b/src/core/nginx.c
@@ -376,6 +376,13 @@ } } + if (log->file->fd != ngx_stderr) { + if (ngx_close_file(log->file->fd) == NGX_FILE_ERROR) { + ngx_log_error(NGX_LOG_ALERT, cycle->log, ngx_errno, + ngx_close_file_n " built-in log failed"); + } + } + ngx_use_stderr = 0; if (ngx_process == NGX_PROCESS_SINGLE) {