mirror of
https://github.com/nginx/nginx.git
synced 2025-07-31 18:46:15 +08:00
merge r3200:
nginx did not close log file set by --error-log-path, the bug was introduced in r2744
This commit is contained in:
parent
ce7f11c6d0
commit
30ee8008be
@ -380,6 +380,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) {
|
||||
|
Loading…
Reference in New Issue
Block a user