From: Ruediger Pluem Date: Sat, 13 Sep 2008 20:32:22 +0000 (+0000) Subject: Merge r681204 from trunk: X-Git-Tag: 2.2.10~47 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=57c2e65a546099265f79539d2fa238a78ce2c0e4;p=thirdparty%2Fapache%2Fhttpd.git 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 git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/branches/2.2.x@695026 13f79535-47bb-0310-9956-ffa450edef68 --- diff --git a/STATUS b/STATUS index e8b8e7f5f45..e1d8d64b88f 100644 --- 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 ] diff --git a/server/main.c b/server/main.c index 22c0b68369c..24a54d3fbf4 100644 --- a/server/main.c +++ b/server/main.c @@ -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);