]> git.ipfire.org Git - thirdparty/apache/httpd.git/commitdiff
Add a pool to dupfile. There is no reason that when we duplicate a file, we...
authorRyan Bloom <rbb@apache.org>
Mon, 17 Apr 2000 19:57:30 +0000 (19:57 +0000)
committerRyan Bloom <rbb@apache.org>
Mon, 17 Apr 2000 19:57:30 +0000 (19:57 +0000)
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

server/log.c

index bbc887388b1b59a36451fa34d9d0e3f2692ed268..ef4f0c50a0deba772e9d0b1e6e8b1df4010ee78c 100644 (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);
     }
 }