From 26489b16e5abc76eb1b72e37651d01a1e1a657cb Mon Sep 17 00:00:00 2001 From: Vladimir Homutov Date: Tue, 4 Jun 2013 11:27:36 +0400 Subject: Core: fixed handling of "stderr" in error_log. If "stderr" was specified in one of the "error_log" directives, stderr is not redirected to the first error_log on startup, configuration reload, and reopening log files. --- src/core/nginx.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/core/nginx.c') diff --git a/src/core/nginx.c b/src/core/nginx.c index 94df9bf74..796717ab9 100644 --- a/src/core/nginx.c +++ b/src/core/nginx.c @@ -387,7 +387,7 @@ main(int argc, char *const *argv) return 1; } - if (cycle->log->file->fd != ngx_stderr) { + if (!cycle->log_use_stderr && cycle->log->file->fd != ngx_stderr) { if (ngx_set_stderr(cycle->log->file->fd) == NGX_FILE_ERROR) { ngx_log_error(NGX_LOG_EMERG, cycle->log, ngx_errno, -- cgit