Mercurial > hg > nginx
comparison src/core/nginx.c @ 5240:d8af1005e886
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.
author | Vladimir Homutov <vl@nginx.com> |
---|---|
date | Tue, 04 Jun 2013 11:27:36 +0400 |
parents | f941cf265cc5 |
children | e088695737c3 |
comparison
equal
deleted
inserted
replaced
5239:85e72ea8fbfd | 5240:d8af1005e886 |
---|---|
385 | 385 |
386 if (ngx_create_pidfile(&ccf->pid, cycle->log) != NGX_OK) { | 386 if (ngx_create_pidfile(&ccf->pid, cycle->log) != NGX_OK) { |
387 return 1; | 387 return 1; |
388 } | 388 } |
389 | 389 |
390 if (cycle->log->file->fd != ngx_stderr) { | 390 if (!cycle->log_use_stderr && cycle->log->file->fd != ngx_stderr) { |
391 | 391 |
392 if (ngx_set_stderr(cycle->log->file->fd) == NGX_FILE_ERROR) { | 392 if (ngx_set_stderr(cycle->log->file->fd) == NGX_FILE_ERROR) { |
393 ngx_log_error(NGX_LOG_EMERG, cycle->log, ngx_errno, | 393 ngx_log_error(NGX_LOG_EMERG, cycle->log, ngx_errno, |
394 ngx_set_stderr_n " failed"); | 394 ngx_set_stderr_n " failed"); |
395 return 1; | 395 return 1; |