]> git.ipfire.org Git - thirdparty/apache/httpd.git/commitdiff
Merge r681204 from trunk:
authorRuediger Pluem <rpluem@apache.org>
Sat, 13 Sep 2008 20:32:22 +0000 (20:32 +0000)
committerRuediger Pluem <rpluem@apache.org>
Sat, 13 Sep 2008 20:32:22 +0000 (20:32 +0000)
* Give possible piped loggers a chance to process their input before they get
  killed by us.

Submitted by: rpluem
Reviewed by: rpluem, jim, gregames

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

STATUS
server/main.c

diff --git a/STATUS b/STATUS
index e8b8e7f5f455d6238211bf17fdb73ef10dcccdc5..e1d8d64b88fa9e79b663fc237adabdcb64eeddd8 100644 (file)
--- a/STATUS
+++ b/STATUS
@@ -92,14 +92,6 @@ PATCHES ACCEPTED TO BACKPORT FROM TRUNK:
    http://svn.apache.org/viewvc?rev=639010&view=rev (mmn)
    +1: niq, rpluem, mturk
 
- * core: Give possible piped loggers a chance to process their input before
-   they get killed by us.
-    Trunk version of patch:
-       http://svn.apache.org/viewvc?rev=681204&view=rev
-    Backport version for 2.2.x of patch:
-       Trunk version of patch works
-    +1: rpluem, jim, gregames
-
 PATCHES PROPOSED TO BACKPORT FROM TRUNK:
   [ New proposals should be added at the end of the list ]
 
index 22c0b68369cd23fd5aeffd50d3a75b49c3f580dd..24a54d3fbf48db15f5768b1bbec8ad5e7ef03e10 100644 (file)
@@ -254,9 +254,19 @@ static void show_compile_settings(void)
 #endif
 }
 
+#define TASK_SWITCH_SLEEP 10000
+
 static void destroy_and_exit_process(process_rec *process,
                                      int process_exit_value)
 {
+    /*
+     * Sleep for TASK_SWITCH_SLEEP micro seconds to cause a task switch on
+     * OS layer and thus give possibly started piped loggers a chance to
+     * process their input. Otherwise it is possible that they get killed
+     * by us before they can do so. In this case maybe valueable log messages
+     * might get lost.
+     */
+    apr_sleep(TASK_SWITCH_SLEEP);
     apr_pool_destroy(process->pool); /* and destroy all descendent pools */
     apr_terminate();
     exit(process_exit_value);