aboutsummaryrefslogtreecommitdiff
path: root/src/core/ngx_cycle.c
diff options
context:
space:
mode:
authorIgor Sysoev <igor@sysoev.ru>2004-02-03 16:43:54 +0000
committerIgor Sysoev <igor@sysoev.ru>2004-02-03 16:43:54 +0000
commit25b36fedf72139617dc172dbca887888b258698d (patch)
treea2279a6ecdbac2779e206eb5da2640bb95f95c99 /src/core/ngx_cycle.c
parenta4b16df728abe1e989a8311e901ba5d9ae30328e (diff)
downloadnginx-25b36fedf72139617dc172dbca887888b258698d.tar.gz
nginx-25b36fedf72139617dc172dbca887888b258698d.zip
nginx-0.0.2-2004-02-03-19:43:54 import
Diffstat (limited to 'src/core/ngx_cycle.c')
-rw-r--r--src/core/ngx_cycle.c15
1 files changed, 15 insertions, 0 deletions
diff --git a/src/core/ngx_cycle.c b/src/core/ngx_cycle.c
index dcae4a0c5..845099814 100644
--- a/src/core/ngx_cycle.c
+++ b/src/core/ngx_cycle.c
@@ -228,6 +228,14 @@ ngx_cycle_t *ngx_init_cycle(ngx_cycle_t *old_cycle)
}
}
+ /* TODO: Win32 DuplicateHandle ? */
+ if (dup2(cycle->log->file->fd, STDERR_FILENO) == -1) {
+ ngx_log_error(NGX_LOG_EMERG, log, ngx_errno,
+ "dup2(STDERR) failed");
+ failed = 1;
+ }
+
+
if (failed) {
/* rollback the new cycle configuration */
@@ -262,6 +270,7 @@ ngx_cycle_t *ngx_init_cycle(ngx_cycle_t *old_cycle)
return NULL;
}
+
/* commit the new cycle configuration */
pool->log = cycle->log;
@@ -438,6 +447,12 @@ void ngx_reopen_files(ngx_cycle_t *cycle, uid_t user)
file[i].fd = fd;
}
+
+ /* TODO: Win32 DuplicateHandle ? */
+ if (dup2(cycle->log->file->fd, STDERR_FILENO) == -1) {
+ ngx_log_error(NGX_LOG_EMERG, cycle->log, ngx_errno,
+ "dup2(STDERR) failed");
+ }
}