httpd-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From stodd...@apache.org
Subject cvs commit: httpd-2.0/server/mpm/winnt mpm_winnt.c
Date Sun, 28 Apr 2002 21:09:37 GMT
stoddard    02/04/28 14:09:36

  Modified:    server/mpm/winnt mpm_winnt.c
  Log:
  Fix a bug in the mod_status display caused by some uninitialized fields.
  Prep for taking mpm_winnt to multi-process...
  
  Revision  Changes    Path
  1.268     +12 -4     httpd-2.0/server/mpm/winnt/mpm_winnt.c
  
  Index: mpm_winnt.c
  ===================================================================
  RCS file: /home/cvs/httpd-2.0/server/mpm/winnt/mpm_winnt.c,v
  retrieving revision 1.267
  retrieving revision 1.268
  diff -u -r1.267 -r1.268
  --- mpm_winnt.c	27 Apr 2002 21:01:20 -0000	1.267
  +++ mpm_winnt.c	28 Apr 2002 21:09:36 -0000	1.268
  @@ -1187,7 +1187,7 @@
       apr_pool_tag(pchild, "pchild");
   
       ap_run_child_init(pchild, ap_server_conf);
  -    
  +
       /* Initialize the child_events */
       max_requests_per_child_event = CreateEvent(NULL, TRUE, FALSE, NULL);
       if (!max_requests_per_child_event) {
  @@ -1484,7 +1484,8 @@
       return 0;
   }
   
  -static int create_process(apr_pool_t *p, HANDLE *child_proc, HANDLE *child_exit_event)
  +static int create_process(apr_pool_t *p, HANDLE *child_proc, HANDLE *child_exit_event,

  +                          DWORD *child_pid)
   {
       int rv;
       char buf[1024];
  @@ -1718,6 +1719,7 @@
   
       *child_proc = pi.hProcess;
       *child_exit_event = hExitEvent;
  +    *child_pid = pi.dwProcessId;
   
       return 0;
   }
  @@ -1773,6 +1775,7 @@
       int shutdown_pending;
       HANDLE child_exit_event;
       HANDLE event_handles[NUM_WAIT_HANDLES];
  +    DWORD child_pid;
   
       restart_pending = shutdown_pending = 0;
   
  @@ -1781,7 +1784,7 @@
   
       /* Create a single child process */
       rv = create_process(pconf, &event_handles[CHILD_HANDLE], 
  -                        &child_exit_event);
  +                        &child_exit_event, &child_pid);
       if (rv < 0) 
       {
           ap_log_error(APLOG_MARK, APLOG_CRIT, apr_get_os_error(), ap_server_conf,
  @@ -1789,10 +1792,15 @@
           shutdown_pending = 1;
           goto die_now;
       }
  -    
       if (!strcasecmp(signal_arg, "runservice")) {
           mpm_service_started();
       }
  +
  +    /* Update the scoreboard. Note that there is only a single active
  +     * child at once.
  +     */
  +    ap_scoreboard_image->parent[0].quiescing = 0;
  +    ap_scoreboard_image->parent[0].pid = child_pid;
   
       /* Wait for shutdown or restart events or for child death */
       rv = WaitForMultipleObjects(NUM_WAIT_HANDLES, (HANDLE *) event_handles, FALSE, INFINITE);
  
  
  

Mime
View raw message