]> granicus.if.org Git - apache/commitdiff
Conditionally revert the otherchild logic from the WinNT MPM, based on
authorWilliam A. Rowe Jr <wrowe@apache.org>
Wed, 29 Jan 2003 15:08:06 +0000 (15:08 +0000)
committerWilliam A. Rowe Jr <wrowe@apache.org>
Wed, 29 Jan 2003 15:08:06 +0000 (15:08 +0000)
  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

server/mpm/winnt/child.c

index a32997e8e24baf8ecd10620da76b893a86ad8898..b3eef5e4f43c5eb512c8041b62350e5b4d589d1a 100644 (file)
@@ -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,