nginx-0.0.2-2004-02-03-19:43:54 import
diff --git a/src/core/ngx_cycle.c b/src/core/ngx_cycle.c
index dcae4a0..8450998 100644
--- a/src/core/ngx_cycle.c
+++ b/src/core/ngx_cycle.c
@@ -228,6 +228,14 @@
}
}
+ /* 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 @@
return NULL;
}
+
/* commit the new cycle configuration */
pool->log = cycle->log;
@@ -438,6 +447,12 @@
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");
+ }
}