]> granicus.if.org Git - apache/commitdiff
resurrect the call to show_mpm_settings(), but defer the entire -V processing until
authorJeff Trawick <trawick@apache.org>
Wed, 25 Mar 2009 16:33:53 +0000 (16:33 +0000)
committerJeff Trawick <trawick@apache.org>
Wed, 25 Mar 2009 16:33:53 +0000 (16:33 +0000)
after module loading if there is no built-in MPM

(we could just defer displaying the MPM info, but that would change the order of
output from what people/scripts expect)

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

server/main.c

index 5dff38339a02443c5682116b83a9f1d80209c40f..b43daf964097835a262518c7b1c259f19cee41a9 100644 (file)
@@ -52,9 +52,6 @@
  * Most significant main() global data can be found in http_config.c
  */
 
-/* XXX call after module loading based on some cmd-line option/define
- */
-
 static void show_mpm_settings(void)
 {
     int mpm_query_info;
@@ -111,6 +108,8 @@ static void show_compile_settings(void)
      */
     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");
@@ -465,7 +464,7 @@ static void usage(process_rec *process)
 int main(int argc, const char * const argv[])
 {
     char c;
-    int configtestonly = 0;
+    int configtestonly = 0, showcompile = 0;
     const char *confname = SERVER_CONFIG_FILE;
     const char *def_server_root = HTTPD_ROOT;
     const char *temp_error_log = NULL;
@@ -600,8 +599,14 @@ int main(int argc, const char * const argv[])
             destroy_and_exit_process(process, 0);
 
         case 'V':
-            show_compile_settings();
-            destroy_and_exit_process(process, 0);
+            if (strcmp(ap_show_mpm(), "")) { /* MPM built-in? */
+                show_compile_settings();
+                destroy_and_exit_process(process, 0);
+            }
+            else {
+                showcompile = 1;
+            }
+            break;
 
         case 'l':
             ap_show_modules();
@@ -682,6 +687,10 @@ int main(int argc, const char * const argv[])
             ap_log_error(APLOG_MARK, APLOG_STARTUP, 0, NULL, "Syntax OK");
             destroy_and_exit_process(process, 0);
         }
+        else if (showcompile) { /* deferred due to dynamically loaded MPM */
+            show_compile_settings();
+            destroy_and_exit_process(process, 0);
+        }
     }
 
     signal_server = APR_RETRIEVE_OPTIONAL_FN(ap_signal_server);