httpd-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From traw...@apache.org
Subject cvs commit: httpd-2.0/server/mpm/winnt child.c mpm_winnt.c mpm_winnt.h
Date Wed, 17 Dec 2003 02:16:44 GMT
trawick     2003/12/16 18:16:44

  Modified:    server/mpm/winnt child.c mpm_winnt.c mpm_winnt.h
  Log:
  add support for querying MPM state to ap_mpm_query() for the WinNT MPM
  
  Revision  Changes    Path
  1.21      +3 -1      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.20
  retrieving revision 1.21
  diff -u -r1.20 -r1.21
  --- child.c	15 Dec 2003 23:19:14 -0000	1.20
  +++ child.c	17 Dec 2003 02:16:44 -0000	1.21
  @@ -92,7 +92,6 @@
   /* child_main() should never need to modify is_graceful!?! */
   extern int volatile is_graceful;
   
  -
   /* Queue for managing the passing of COMP_CONTEXTs between
    * the accept and worker threads.
    */
  @@ -926,6 +925,7 @@
           if (!listener_started && threads_created) {
               create_listener_thread();
               listener_started = 1;
  +            winnt_mpm_state = AP_MPMQ_RUNNING;
           }
           if (threads_created == ap_threads_per_child) {
               break;
  @@ -1004,6 +1004,8 @@
        */
   
    shutdown:
  +
  +    winnt_mpm_state = AP_MPMQ_STOPPING;
       /* Setting is_graceful will cause threads handling keep-alive connections 
        * to close the connection after handling the current request.
        */
  
  
  
  1.303     +8 -0      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.302
  retrieving revision 1.303
  diff -u -r1.302 -r1.303
  --- mpm_winnt.c	15 Dec 2003 23:19:14 -0000	1.302
  +++ mpm_winnt.c	17 Dec 2003 02:16:44 -0000	1.303
  @@ -107,6 +107,7 @@
   static int thread_limit = DEFAULT_THREAD_LIMIT;
   static int first_thread_limit = 0;
   static int changed_limit_at_restart;
  +int winnt_mpm_state = AP_MPMQ_STARTING;
   
   /* ap_my_generation are used by the scoreboard code */
   ap_generation_t volatile ap_my_generation=0;
  @@ -312,6 +313,7 @@
           switch(type) {
              case SIGNAL_PARENT_SHUTDOWN: 
              {
  +               winnt_mpm_state = AP_MPMQ_STOPPING;
                  SetEvent(shutdown_event); 
                  break;
              }
  @@ -319,6 +321,7 @@
              case SIGNAL_PARENT_RESTART: 
              case SIGNAL_PARENT_RESTART_GRACEFUL:
              {
  +               winnt_mpm_state = AP_MPMQ_STOPPING;
                  is_graceful = 1;
                  SetEvent(restart_event); 
                  break;
  @@ -330,6 +333,7 @@
       switch(type) {
          case SIGNAL_PARENT_SHUTDOWN: 
          {
  +           winnt_mpm_state = AP_MPMQ_STOPPING;
              signal_name = signal_shutdown_name; 
              break;
          }
  @@ -337,6 +341,7 @@
          case SIGNAL_PARENT_RESTART: 
          case SIGNAL_PARENT_RESTART_GRACEFUL:
          {
  +           winnt_mpm_state = AP_MPMQ_STOPPING;
              signal_name = signal_restart_name;     
              is_graceful = 1;
              break;
  @@ -1097,6 +1102,9 @@
               return APR_SUCCESS;
           case AP_MPMQ_MAX_DAEMONS:
               *result = 0;
  +            return APR_SUCCESS;
  +        case AP_MPMQ_MPM_STATE:
  +            *result = winnt_mpm_state;
               return APR_SUCCESS;
       }
       return APR_ENOTIMPL;
  
  
  
  1.44      +1 -0      httpd-2.0/server/mpm/winnt/mpm_winnt.h
  
  Index: mpm_winnt.h
  ===================================================================
  RCS file: /home/cvs/httpd-2.0/server/mpm/winnt/mpm_winnt.h,v
  retrieving revision 1.43
  retrieving revision 1.44
  diff -u -r1.43 -r1.44
  --- mpm_winnt.h	15 Dec 2003 23:19:14 -0000	1.43
  +++ mpm_winnt.h	17 Dec 2003 02:16:44 -0000	1.44
  @@ -102,6 +102,7 @@
   /* From winnt.c: */
   
   extern int use_acceptex;
  +extern int winnt_mpm_state;
   extern OSVERSIONINFO osver;
   extern void clean_child_exit(int);
   
  
  
  

Mime
View raw message