#define isatty(n) (0)
#endif
+/* we know core's module_index is 0 */
+#undef APLOG_MODULE_INDEX
+#define APLOG_MODULE_INDEX AP_CORE_MODULE_INDEX
+
/* WARNING: Win32 binds http_main.c dynamically to the server. Please place
* extern functions and global data in another appropriate module.
*
printf("Server's Module Magic Number: %u:%u\n",
MODULE_MAGIC_NUMBER_MAJOR, MODULE_MAGIC_NUMBER_MINOR);
#if APR_MAJOR_VERSION >= 2
- printf("Server loaded: APR %s\n", apr_version_string());
- printf("Compiled using: APR %s\n", APR_VERSION_STRING);
+ printf("Server loaded: APR %s, PCRE %s\n",
+ apr_version_string(), ap_pcre_version_string(AP_REG_PCRE_LOADED));
+ printf("Compiled using: APR %s, PCRE %s\n",
+ APR_VERSION_STRING, ap_pcre_version_string(AP_REG_PCRE_COMPILED));
#else
- printf("Server loaded: APR %s, APR-UTIL %s\n",
- apr_version_string(), apu_version_string());
- printf("Compiled using: APR %s, APR-UTIL %s\n",
- APR_VERSION_STRING, APU_VERSION_STRING);
+ printf("Server loaded: APR %s, APR-UTIL %s, PCRE %s\n",
+ apr_version_string(), apu_version_string(),
+ ap_pcre_version_string(AP_REG_PCRE_LOADED));
+ printf("Compiled using: APR %s, APR-UTIL %s, PCRE %s\n",
+ APR_VERSION_STRING, APU_VERSION_STRING,
+ ap_pcre_version_string(AP_REG_PCRE_COMPILED));
#endif
/* sizeof(foo) is long on some platforms so we might as well
* make it long everywhere to keep the printf format
" -t -D DUMP_MODULES : show all loaded modules ");
ap_log_error(APLOG_MARK, APLOG_STARTUP, 0, NULL,
" -M : a synonym for -t -D DUMP_MODULES");
+ ap_log_error(APLOG_MARK, APLOG_STARTUP, 0, NULL,
+ " -t -D DUMP_INCLUDES: show all included configuration files");
ap_log_error(APLOG_MARK, APLOG_STARTUP, 0, NULL,
" -t : run syntax check for config files");
ap_log_error(APLOG_MARK, APLOG_STARTUP, 0, NULL,
module **mod;
const char *opt_arg;
APR_OPTIONAL_FN_TYPE(ap_signal_server) *signal_server;
+ int rc = OK;
AP_MONCONTROL(0); /* turn off profiling of startup */
/* Setting -D DUMP_MODULES is equivalent to setting -M */
else if (strcmp(opt_arg, "DUMP_MODULES") == 0)
ap_run_mode = AP_SQ_RM_CONFIG_DUMP;
+ /* Setting -D DUMP_INCLUDES is a type of configuration dump */
+ else if (strcmp(opt_arg, "DUMP_INCLUDES") == 0)
+ ap_run_mode = AP_SQ_RM_CONFIG_DUMP;
break;
case 'e':
apr_pool_destroy(ptemp);
- for (;;) {
+ do {
ap_main_state = AP_SQ_MS_DESTROY_CONFIG;
apr_hook_deregister_all();
apr_pool_clear(pconf);
ap_run_optional_fn_retrieve();
ap_main_state = AP_SQ_MS_RUN_MPM;
- if (ap_run_mpm(pconf, plog, ap_server_conf) != OK)
- break;
+ rc = ap_run_mpm(pconf, plog, ap_server_conf);
apr_pool_lock(pconf, 0);
- }
- apr_pool_lock(pconf, 0);
- destroy_and_exit_process(process, 0);
+ } while (rc == OK);
+
+ if (rc == DONE) {
+ rc = OK;
+ }
+ else if (rc != OK) {
+ ap_log_error(APLOG_MARK, APLOG_EMERG, 0, NULL, APLOGNO(02818)
+ "MPM run failed, exiting");
+ }
+ destroy_and_exit_process(process, rc);
- return 0; /* Termination 'ok' */
+ /* NOTREACHED */
+ return !OK;
}
#ifdef AP_USING_AUTOCONF