httpd-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From wr...@apache.org
Subject cvs commit: httpd-2.0/server/mpm/winnt child.c
Date Wed, 29 Jan 2003 15:08:07 GMT
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 */
  
  
  

Mime
View raw message