httpd-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From wr...@apache.org
Subject svn commit: r580437 - /httpd/httpd/trunk/server/log.c
Date Fri, 28 Sep 2007 17:43:24 GMT
Author: wrowe
Date: Fri Sep 28 10:43:24 2007
New Revision: 580437

URL: http://svn.apache.org/viewvc?rev=580437&view=rev
Log:
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

Modified:
    httpd/httpd/trunk/server/log.c

Modified: httpd/httpd/trunk/server/log.c
URL: http://svn.apache.org/viewvc/httpd/httpd/trunk/server/log.c?rev=580437&r1=580436&r2=580437&view=diff
==============================================================================
--- httpd/httpd/trunk/server/log.c (original)
+++ httpd/httpd/trunk/server/log.c Fri Sep 28 10:43:24 2007
@@ -421,6 +421,16 @@
                 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



Mime
View raw message