From 4f635db38614a95df7a8cf7c64af337ed19e2708 Mon Sep 17 00:00:00 2001 From: Bill Stoddard Date: Thu, 17 May 2001 12:36:05 +0000 Subject: [PATCH] Win32: Enable reliable piped log support. git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@89134 13f79535-47bb-0310-9956-ffa450edef68 --- CHANGES | 5 +++++ server/mpm/winnt/mpm_winnt.c | 7 ++----- 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/CHANGES b/CHANGES index 94a2ddb0e6..4c8069292e 100644 --- a/CHANGES +++ b/CHANGES @@ -1,4 +1,9 @@ Changes with Apache 2.0.18-dev + *) Win32: Add support for reliable piped logs. If the logging process + goes down, Apache will automatically restart it. This function has + been part of Apache on Unix/Linux/BSD since the early v1.3 releases. + [Bill Stoddard] + *) 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 diff --git a/server/mpm/winnt/mpm_winnt.c b/server/mpm/winnt/mpm_winnt.c index 921e362ddd..33dc04793a 100644 --- a/server/mpm/winnt/mpm_winnt.c +++ b/server/mpm/winnt/mpm_winnt.c @@ -1060,7 +1060,7 @@ static void child_main() * number of completion contexts, etc.) */ while (1) { - rv = WaitForMultipleObjects(2, (HANDLE *) child_events, FALSE, INFINITE); + rv = WaitForMultipleObjects(2, (HANDLE *) child_events, FALSE, 1000); cld = rv - WAIT_OBJECT_0; if (rv == WAIT_FAILED) { /* Something serious is wrong */ @@ -1069,10 +1069,7 @@ static void child_main() break; } else if (rv == WAIT_TIMEOUT) { - /* Hey, this cannot happen */ - ap_log_error(APLOG_MARK, APLOG_CRIT, APR_SUCCESS, server_conf, - "Child %d: WAIT_TIMEOUT -- shutting down server", my_pid); - break; + apr_proc_other_child_check(); } else if (cld == 0) { /* Exit event was signaled */ -- 2.50.1