You are viewing a plain text version of this content. The canonical link for it is here.
Posted to cvs@httpd.apache.org by rp...@apache.org on 2008/09/13 22:32:22 UTC
svn commit: r695026 - in /httpd/httpd/branches/2.2.x: STATUS server/main.c
Author: rpluem
Date: Sat Sep 13 13:32:22 2008
New Revision: 695026
URL: http://svn.apache.org/viewvc?rev=695026&view=rev
Log:
Merge r681204 from trunk:
* Give possible piped loggers a chance to process their input before they get
killed by us.
Submitted by: rpluem
Reviewed by: rpluem, jim, gregames
Modified:
httpd/httpd/branches/2.2.x/STATUS
httpd/httpd/branches/2.2.x/server/main.c
Modified: httpd/httpd/branches/2.2.x/STATUS
URL: http://svn.apache.org/viewvc/httpd/httpd/branches/2.2.x/STATUS?rev=695026&r1=695025&r2=695026&view=diff
==============================================================================
--- httpd/httpd/branches/2.2.x/STATUS (original)
+++ httpd/httpd/branches/2.2.x/STATUS Sat Sep 13 13:32:22 2008
@@ -92,14 +92,6 @@
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 ]
Modified: httpd/httpd/branches/2.2.x/server/main.c
URL: http://svn.apache.org/viewvc/httpd/httpd/branches/2.2.x/server/main.c?rev=695026&r1=695025&r2=695026&view=diff
==============================================================================
--- httpd/httpd/branches/2.2.x/server/main.c (original)
+++ httpd/httpd/branches/2.2.x/server/main.c Sat Sep 13 13:32:22 2008
@@ -254,9 +254,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);