From: Ryan Bloom Date: Mon, 17 Apr 2000 19:57:30 +0000 (+0000) Subject: Add a pool to dupfile. There is no reason that when we duplicate a file, we... X-Git-Tag: apache-doc-split-01~18 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=860eb117054a1a59d49d75707f0defef40b52159;p=thirdparty%2Fapache%2Fhttpd.git 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 --- diff --git a/server/log.c b/server/log.c index bbc887388b1..ef4f0c50a0d 100644 --- a/server/log.c +++ b/server/log.c @@ -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); } }