]> git.ipfire.org Git - thirdparty/apache/httpd.git/commitdiff
Merge r580437 from trunk:
authorJim Jagielski <jim@apache.org>
Thu, 13 Dec 2007 13:54:16 +0000 (13:54 +0000)
committerJim Jagielski <jim@apache.org>
Thu, 13 Dec 2007 13:54:16 +0000 (13:54 +0000)
Share a single write-pipe handle for piped stderr logging, this
prevents an extra logging process from hanging around after the
initial config-phase.

Reviewed by: rpluem, wrowe
Submitted by: wrowe
Reviewed by: jim

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/branches/2.0.x@603921 13f79535-47bb-0310-9956-ffa450edef68

STATUS
server/log.c

diff --git a/STATUS b/STATUS
index 4f0a856865c5d1048ed107ae0dbf559768a4a2e4..ef304cb1bd768dce7563ce965076b555f1742e65 100644 (file)
--- a/STATUS
+++ b/STATUS
@@ -112,14 +112,6 @@ CURRENT RELEASE NOTES:
 
 RELEASE SHOWSTOPPERS:
 
-  * core log.c: Authored and Reviewed by both rplume and wrowe within 
-    the same 10 minutes, share only a single apr_file_t/fd between the
-    stderr and server_main->error_log to prevent any lingering write 
-    handles from hanging around in unexpected ways.
-       http://svn.apache.org/viewvc?view=rev&revision=580437
-     PR 43491, solution validated by reporter
-     +1: wrowe, rpluem, jim
-
   * core log.c: Work around possible solutions rejected by apr for
     the old implementation of apr_proc_create(), and explicitly pass
     the output and error channels to all log processes created.
index 3eb56c69b2d9988bb2382e28512bae5eb45ef508..f5d2228f579009d18b8967925b33c62db00f4646 100644 (file)
@@ -423,6 +423,16 @@ int ap_open_logs(apr_pool_t *pconf, apr_pool_t *p /* plog */,
                 apr_pool_destroy(stderr_pool);
             stderr_pool = stderr_p;
             replace_stderr = 0;
+            /*
+             * Now that we have dup'ed s_main->error_log to stderr_log
+             * close it and set s_main->error_log to stderr_log. This avoids
+             * this fd being inherited by the next piped logger who would
+             * keep open the writing end of the pipe that this one uses
+             * as stdin. This in turn would prevent the piped logger from
+             * exiting.
+             */
+             apr_file_close(s_main->error_log);
+             s_main->error_log = stderr_log;
         }
     }
     /* note that stderr may still need to be replaced with something