Return-Path: Delivered-To: apmail-httpd-cvs-archive@httpd.apache.org Received: (qmail 94161 invoked by uid 500); 29 Jan 2003 15:08:19 -0000 Mailing-List: contact cvs-help@httpd.apache.org; run by ezmlm Precedence: bulk Reply-To: dev@httpd.apache.org list-help: list-unsubscribe: list-post: Delivered-To: mailing list cvs@httpd.apache.org Received: (qmail 94111 invoked by uid 500); 29 Jan 2003 15:08:18 -0000 Delivered-To: apmail-httpd-2.0-cvs@apache.org Date: 29 Jan 2003 15:08:07 -0000 Message-ID: <20030129150807.3302.qmail@icarus.apache.org> From: wrowe@apache.org To: httpd-2.0-cvs@apache.org Subject: cvs commit: httpd-2.0/server/mpm/winnt child.c X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N wrowe 2003/01/29 07:08:06 Modified: server/mpm/winnt child.c Log: 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. Revision Changes Path 1.10 +21 -4 httpd-2.0/server/mpm/winnt/child.c Index: child.c =================================================================== RCS file: /home/cvs/httpd-2.0/server/mpm/winnt/child.c,v retrieving revision 1.9 retrieving revision 1.10 diff -u -r1.9 -r1.10 --- child.c 14 Oct 2002 14:54:45 -0000 1.9 +++ child.c 29 Jan 2003 15:08:06 -0000 1.10 @@ -885,18 +885,35 @@ * 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 */