]> granicus.if.org Git - apache/commitdiff
Merge r1791975 from trunk:
authorJim Jagielski <jim@apache.org>
Tue, 2 May 2017 11:00:14 +0000 (11:00 +0000)
committerJim Jagielski <jim@apache.org>
Tue, 2 May 2017 11:00:14 +0000 (11:00 +0000)
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.
Submitted by: jchampion
Reviewed by: jchampion, covener, jim

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/branches/2.4.x@1793465 13f79535-47bb-0310-9956-ffa450edef68

STATUS
server/main.c

diff --git a/STATUS b/STATUS
index 5e0c13a8703ad68ec1d56251e15663a83132ae09..216559963e18cd14c91bcf33d87a2cc9dd620335 100644 (file)
--- a/STATUS
+++ b/STATUS
@@ -125,13 +125,6 @@ RELEASE SHOWSTOPPERS:
 PATCHES ACCEPTED TO BACKPORT FROM TRUNK:
   [ start all new proposals below, under PATCHES PROPOSED. ]
 
-   * core: don't run configtest in -V mode when MPM DSOs are in use, and try to
-           print compile settings even if reading the configuration fails. Fixes
-           PR61009.
-     trunk patch: https://svn.apache.org/r1791975
-     2.4.x patch: trunk works
-     +1: jchampion, covener, jim
-
   *) Easy patches: synch 2.4.x and trunk
      - mod_autoindex: Save a few bytes in the conf pool.
      - mod_autoindex: Use 'ap_cstr_casecmp' to simplify code + remove dead code
index c5f35b9b447a5e003c9fc2216e4b0d970beffbe3..ba9d91c6d0e3b2c8771d86e39eb2db3ee6ce6b4b 100644 (file)
@@ -629,10 +629,22 @@ int main(int argc, const char * const argv[])
     }
     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();
 
@@ -661,10 +673,7 @@ int main(int argc, const char * const argv[])
         }
 
         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);
             }