From 577e7224d58104a93473585ee65b22065ec367b3 Mon Sep 17 00:00:00 2001 From: Jeff Trawick Date: Wed, 25 Mar 2009 16:33:53 +0000 Subject: [PATCH] resurrect the call to show_mpm_settings(), but defer the entire -V processing until 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 | 21 +++++++++++++++------ 1 file changed, 15 insertions(+), 6 deletions(-) diff --git a/server/main.c b/server/main.c index 5dff38339a..b43daf9640 100644 --- a/server/main.c +++ b/server/main.c @@ -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); -- 2.40.0