httpd-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rpl...@apache.org
Subject svn commit: r681204 - /httpd/httpd/trunk/server/main.c
Date Wed, 30 Jul 2008 21:08:33 GMT
Author: rpluem
Date: Wed Jul 30 14:08:33 2008
New Revision: 681204

URL: http://svn.apache.org/viewvc?rev=681204&view=rev
Log:
* Give possible piped loggers a chance to process their input before they get
  killed by us.

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

Modified: httpd/httpd/trunk/server/main.c
URL: http://svn.apache.org/viewvc/httpd/httpd/trunk/server/main.c?rev=681204&r1=681203&r2=681204&view=diff
==============================================================================
--- httpd/httpd/trunk/server/main.c (original)
+++ httpd/httpd/trunk/server/main.c Wed Jul 30 14:08:33 2008
@@ -259,9 +259,19 @@
 #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);



Mime
View raw message