Add a pool to dupfile. There is no reason that when we duplicate a file, we would want to use the same pool for the duplicated file as we used for

the original file.  This should solve a problem we were having with
dieing quietly on startup, because we are no longer closing stderr in the
original process and then opening the config file as file descriptor 2.

The original problem report can be found in the message
<20000311232812.A1066@sanguine.linuxcare.com.au>


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@84985 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Ryan Bloom
2000-04-17 19:57:30 +00:00
parent 2106d6e287
commit 860eb11705

View File

@ -269,7 +269,7 @@ void ap_open_logs(server_rec *s_main, ap_pool_t *p)
/* replace stderr with this new log */
ap_flush(s_main->error_log);
ap_open_stderr(&errfile, p);
if ((rc = ap_dupfile(&errfile, s_main->error_log)) != APR_SUCCESS) {
if ((rc = ap_dupfile(&errfile, s_main->error_log, NULL)) != APR_SUCCESS) {
ap_log_error(APLOG_MARK, APLOG_CRIT, rc, s_main,
"unable to replace stderr with error_log");
} else {
@ -306,7 +306,7 @@ API_EXPORT(void) ap_error_log2stderr(server_rec *s) {
ap_open_stderr(&errfile, s->process->pool);
if (s->error_log != NULL) {
ap_dupfile(&(s->error_log), errfile);
ap_dupfile(&(s->error_log), errfile, s->process->pool);
}
}