]> granicus.if.org Git - apache/commitdiff
Added mpm_state to ap_mpm_query() for the NetWare MPM
authorBradley Nicholes <bnicholes@apache.org>
Tue, 16 Dec 2003 20:55:04 +0000 (20:55 +0000)
committerBradley Nicholes <bnicholes@apache.org>
Tue, 16 Dec 2003 20:55:04 +0000 (20:55 +0000)
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@102078 13f79535-47bb-0310-9956-ffa450edef68

server/mpm/netware/mpm_netware.c

index 4178b3a5b0ae1e17cfc68c1c863a8caee6f25913..037f804ecb37a153542f9bd2286c6b7f7a7880f1 100644 (file)
@@ -154,6 +154,7 @@ static int ap_threads_to_start=0;
 static int ap_threads_min_free=0;
 static int ap_threads_max_free=0;
 static int ap_threads_limit=0;
+static int mpm_state = AP_MPMQ_STARTING;
 
 /*
  * The max child slot ever assigned, preserved across restarts.  Necessary
@@ -268,6 +269,9 @@ AP_DECLARE(apr_status_t) ap_mpm_query(int query_code, int *result)
         case AP_MPMQ_MAX_DAEMONS:
             *result = 1;
             return APR_SUCCESS;
+        case AP_MPMQ_MPM_STATE:
+            *result = mpm_state;
+            return APR_SUCCESS;
     }
     return APR_ENOTIMPL;
 }
@@ -946,6 +950,7 @@ int ap_mpm_run(apr_pool_t *_pconf, apr_pool_t *plog, server_rec *s)
 #endif
     show_server_data();
 
+    mpm_state = AP_MPMQ_RUNNING;
     while (!restart_pending && !shutdown_pending) {
         perform_idle_server_maintenance(pconf);
         if (show_settings)
@@ -953,6 +958,7 @@ int ap_mpm_run(apr_pool_t *_pconf, apr_pool_t *plog, server_rec *s)
         apr_thread_yield();
         apr_sleep(SCOREBOARD_MAINTENANCE_INTERVAL);
     }
+    mpm_state = AP_MPMQ_STOPPING;
 
 
     /* Shutdown the listen sockets so that we don't get stuck in a blocking call. 
@@ -998,6 +1004,8 @@ static int netware_pre_config(apr_pool_t *p, apr_pool_t *plog, apr_pool_t *ptemp
     int debug;
     char *addrname = NULL;
 
+    mpm_state = AP_MPMQ_STARTING;
+
     debug = ap_exists_config_define("DEBUG");
 
     is_graceful = 0;