httpd-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jchamp...@apache.org
Subject svn commit: r1791975 - /httpd/httpd/trunk/server/main.c
Date Wed, 19 Apr 2017 20:38:26 GMT
Author: jchampion
Date: Wed Apr 19 20:38:26 2017
New Revision: 1791975

URL: http://svn.apache.org/viewvc?rev=1791975&view=rev
Log:
PR61009: be as helpful as possible during -V operation

A configtest isn't useful if you're just trying to get compile settings.
Move the settings dump up to just after ap_read_config(), which has
already done the minimum necessary to figure out which MPM is in use.

Even if ap_read_config() failed, still print as many compile settings as
we can. The user will see the error log entry on stderr.

Modified:
    httpd/httpd/trunk/server/main.c

Modified: httpd/httpd/trunk/server/main.c
URL: http://svn.apache.org/viewvc/httpd/httpd/trunk/server/main.c?rev=1791975&r1=1791974&r2=1791975&view=diff
==============================================================================
--- httpd/httpd/trunk/server/main.c (original)
+++ httpd/httpd/trunk/server/main.c Wed Apr 19 20:38:26 2017
@@ -651,10 +651,22 @@ int main(int argc, const char * const ar
     }
     ap_server_conf = ap_read_config(process, ptemp, confname, &ap_conftree);
     if (!ap_server_conf) {
+        if (showcompile) {
+            /* Well, we tried. Show as much as we can, but exit nonzero to
+             * indicate that something's not right. The cause should have
+             * already been logged. */
+            show_compile_settings();
+        }
         destroy_and_exit_process(process, 1);
     }
     apr_pool_cleanup_register(pconf, &ap_server_conf, ap_pool_cleanup_set_null,
                               apr_pool_cleanup_null);
+
+    if (showcompile) { /* deferred due to dynamically loaded MPM */
+        show_compile_settings();
+        destroy_and_exit_process(process, 0);
+    }
+
     /* sort hooks here to make sure pre_config hooks are sorted properly */
     apr_hook_sort_all();
 
@@ -683,10 +695,7 @@ int main(int argc, const char * const ar
         }
 
         if (ap_run_mode != AP_SQ_RM_NORMAL) {
-            if (showcompile) { /* deferred due to dynamically loaded MPM */
-                show_compile_settings();
-            }
-            else if (showdirectives) { /* deferred in case of DSOs */
+            if (showdirectives) { /* deferred in case of DSOs */
                 ap_show_directives();
                 destroy_and_exit_process(process, 0);
             }



Mime
View raw message