From: William A. Rowe Jr Date: Wed, 29 Jan 2003 15:08:06 +0000 (+0000) Subject: Conditionally revert the otherchild logic from the WinNT MPM, based on X-Git-Tag: pre_ajp_proxy~2199 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=da2885158fbbf026803e612478ff0e85c5a19536;p=apache Conditionally revert the otherchild logic from the WinNT MPM, based on the APR_HAS_OTHER_CHILD flag from APR. This gets us building again on win32. git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@98531 13f79535-47bb-0310-9956-ffa450edef68 --- diff --git a/server/mpm/winnt/child.c b/server/mpm/winnt/child.c index a32997e8e2..b3eef5e4f4 100644 --- a/server/mpm/winnt/child.c +++ b/server/mpm/winnt/child.c @@ -885,19 +885,36 @@ void child_main(apr_pool_t *pconf) * TIMEOUT: * To do periodic maintenance on the server (check for thread exits, * number of completion contexts, etc.) + * + * XXX: thread exits *aren't* being checked. + * + * XXX: other_child - we need the process handles to the other children + * in order to map them to apr_proc_other_child_read (which is not + * named well, it's more like a_p_o_c_died.) + * + * XXX: however - if we get a_p_o_c handle inheritance working, and + * the parent process creates other children and passes the pipes + * to our worker processes, then we have no business doing such + * things in the child_main loop, but should happen in master_main. */ while (1) { +#if !APR_HAS_OTHER_CHILD + rv = WaitForMultipleObjects(2, (HANDLE *) child_events, FALSE, INFINITE); + cld = rv - WAIT_OBJECT_0; +#else rv = WaitForMultipleObjects(2, (HANDLE *) child_events, FALSE, 1000); cld = rv - WAIT_OBJECT_0; - if (rv == WAIT_FAILED) { + if (rv == WAIT_TIMEOUT) { + apr_proc_other_child_check(); + } + else +#endif + if (rv == WAIT_FAILED) { /* Something serious is wrong */ ap_log_error(APLOG_MARK, APLOG_CRIT, apr_get_os_error(), ap_server_conf, "Child %d: WAIT_FAILED -- shutting down server"); break; } - else if (rv == WAIT_TIMEOUT) { - apr_proc_other_child_check(); - } else if (cld == 0) { /* Exit event was signaled */ ap_log_error(APLOG_MARK, APLOG_NOTICE, APR_SUCCESS, ap_server_conf,