nginx did not close log file set by --error-log-path,

the bug was introduced in r2744
This commit is contained in:
Igor Sysoev 2009-10-09 14:43:09 +00:00
parent 671236993a
commit e7138540d6

View File

@ -376,6 +376,13 @@ main(int argc, char *const *argv)
}
}
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) {