]> granicus.if.org Git - apache/commitdiff
Clean up httpd -V output: Instead of displaying the MPM source
authorJeff Trawick <trawick@apache.org>
Thu, 4 Dec 2003 03:05:42 +0000 (03:05 +0000)
committerJeff Trawick <trawick@apache.org>
Thu, 4 Dec 2003 03:05:42 +0000 (03:05 +0000)
directory, display the MPM name and some MPM properties.

Submitted by: Geoffrey Young <geoff apache.org>
Reviewed by:  Jeff Trawick

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@101978 13f79535-47bb-0310-9956-ffa450edef68

CHANGES
server/main.c

diff --git a/CHANGES b/CHANGES
index 1c405e5c2b79fb8ffb58a9d4441f6e19df35eae3..d1e9cf02a58e66570f8ce09a5ee88b492d1d272e 100644 (file)
--- a/CHANGES
+++ b/CHANGES
@@ -2,6 +2,10 @@ Changes with Apache 2.1.0-dev
 
   [Remove entries to the current 2.0 section below, when backported]
 
+  *) Clean up httpd -V output: Instead of displaying the MPM source
+     directory, display the MPM name and some MPM properties.
+     [Geoffrey Young <geoff apache.org>]
+
   *) Fixed cache-removal order in mod_mem_cache.
      [Jean-Jacques Clar, Cliff Woolley]
 
index c404c064678a63682317ec84f2099f111325b7dc..0731628a9d2058ce1e3b07752d32a89c3bc87be8 100644 (file)
  * Most significant main() global data can be found in http_config.c
  */
 
-/* XXX - We should be able to grab the per-MPM settings here too */
+static void show_mpm_settings(void)
+{
+    int mpm_query_info;
+    apr_status_t retval;
+
+    printf("Server MPM:     %s\n", ap_show_mpm());
+
+    retval = ap_mpm_query(AP_MPMQ_IS_THREADED, &mpm_query_info);
+
+    if (retval == APR_SUCCESS) {
+        printf("  threaded:     ");
+
+        if (mpm_query_info == AP_MPMQ_DYNAMIC) {
+            printf("yes (variable thread count)\n");
+        }
+        else if (mpm_query_info == AP_MPMQ_STATIC) {
+            printf("yes (fixed thread count)\n");
+        }
+        else {
+            printf("no\n");
+        }
+    }
+
+    retval = ap_mpm_query(AP_MPMQ_IS_FORKED, &mpm_query_info);
+
+    if (retval == APR_SUCCESS) {
+        printf("    forked:     ");
+
+        if (mpm_query_info == AP_MPMQ_DYNAMIC) {
+            printf("yes (variable process count)\n");
+        }
+        else if (mpm_query_info == AP_MPMQ_STATIC) {
+            printf("yes (fixed process count)\n");
+        }
+        else {
+            printf("no\n");
+        }
+    }
+}
+
 static void show_compile_settings(void)
 {
     printf("Server version: %s\n", ap_get_server_version());
@@ -98,6 +137,9 @@ static void show_compile_settings(void)
      * consistent
      */
     printf("Architecture:   %ld-bit\n", 8 * (long)sizeof(void *));
+
+    show_mpm_settings();
+
     printf("Server compiled with....\n");
 #ifdef BIG_SECURITY_HOLE
     printf(" -D BIG_SECURITY_HOLE\n");
@@ -107,10 +149,6 @@ static void show_compile_settings(void)
     printf(" -D SECURITY_HOLE_PASS_AUTHORIZATION\n");
 #endif
 
-#ifdef APACHE_MPM_DIR
-    printf(" -D APACHE_MPM_DIR=\"%s\"\n", APACHE_MPM_DIR);
-#endif
-
 #ifdef HAVE_SHMGET
     printf(" -D HAVE_SHMGET\n");
 #endif