summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorIgor Sysoev <igor@sysoev.ru>2010-02-01 14:44:43 +0000
committerIgor Sysoev <igor@sysoev.ru>2010-02-01 14:44:43 +0000
commit30ee8008be32ec1b7229eff2bd0b2462146c480c (patch)
tree8567793c06f06dc311655516080802d87a548a1c
parentce7f11c6d0b74a8e93e22d7995d652e020de785c (diff)
downloadnginx-30ee8008be32ec1b7229eff2bd0b2462146c480c.tar.gz
nginx-30ee8008be32ec1b7229eff2bd0b2462146c480c.tar.bz2
merge r3200:
nginx did not close log file set by --error-log-path, the bug was introduced in r2744
-rw-r--r--src/core/nginx.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/core/nginx.c b/src/core/nginx.c
index a9951d3a2..5df96a438 100644
--- a/src/core/nginx.c
+++ b/src/core/nginx.c
@@ -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) {