]> granicus.if.org Git - apache/commitdiff
Do not start piped log processes during the config file
authorBill Stoddard <stoddard@apache.org>
Wed, 16 May 2001 13:49:40 +0000 (13:49 +0000)
committerBill Stoddard <stoddard@apache.org>
Wed, 16 May 2001 13:49:40 +0000 (13:49 +0000)
preflight.  This change also circumvents a problem on
Windows where the rotatelog processes created during preflight
was not getting cleaned up properly.

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@89127 13f79535-47bb-0310-9956-ffa450edef68

CHANGES
modules/loggers/mod_log_config.c

diff --git a/CHANGES b/CHANGES
index cf4da2228732165cba2b5434ffe7a89d317d2a3d..94a2ddb0e691222d576dac60cc15ec68a99054b5 100644 (file)
--- a/CHANGES
+++ b/CHANGES
@@ -1,4 +1,10 @@
 Changes with Apache 2.0.18-dev
+  *) Do not start piped log processes during the config file 
+     preflight.  This change also circumvents a problem on 
+     Windows where the rotatelog processes created during preflight
+     was not getting cleaned up properly.
+     [Bill Stoddard]
+
   *) add "Request Phase Participation" info to mod_info
      [Doug MacEachern]
 
index c2b655c4553582cd756bcb9d3609713aa99bdcfb..305617763642914f3a70c467b9f9867660f61bb9 100644 (file)
@@ -1013,6 +1013,18 @@ static config_log_state *open_config_log(server_rec *s, apr_pool_t *p,
                                          apr_array_header_t *default_format)
 {
     apr_status_t status;
+    void *data;
+    const char *userdata_key = "open_config_log";
+
+    /* Skip opening the log the first time through. It's really
+     * good to avoid starting the piped log process during preflight.
+     */
+    apr_pool_userdata_get(&data, userdata_key, s->process->pool);
+    if (!data) {
+        apr_pool_userdata_set((const void *)1, userdata_key,
+                         apr_pool_cleanup_null, s->process->pool);
+        return cls;
+    }
 
     if (cls->log_fd != NULL) {
         return cls;             /* virtual config shared w/main server */