summaryrefslogtreecommitdiffstats
path: root/server
diff options
context:
space:
mode:
authorWilliam A. Rowe Jr <wrowe@apache.org>2000-05-27 08:22:55 +0200
committerWilliam A. Rowe Jr <wrowe@apache.org>2000-05-27 08:22:55 +0200
commit5e05af51e4271e4f057b9bcfb204d14ba535678f (patch)
tree686d98748ed3e1d7d5c860ab97bacc5a0b5cc352 /server
parent (diff)
downloadapache2-5e05af51e4271e4f057b9bcfb204d14ba535678f.tar.xz
apache2-5e05af51e4271e4f057b9bcfb204d14ba535678f.zip
Pass the process_rec to the MPM to allow rewriting of the args list. Especially necessary under Win32, or other non-unix front ends where oddball arguments might be required, but without causing a mess in http_main.c. git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@85311 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'server')
-rw-r--r--server/main.c23
-rw-r--r--server/mpm/dexter/dexter.c1
-rw-r--r--server/mpm/mpmt_beos/mpmt_beos.c1
-rw-r--r--server/mpm/mpmt_pthread/mpmt_pthread.c1
-rw-r--r--server/mpm/prefork/prefork.c1
-rw-r--r--server/mpm/spmt_os2/spmt_os2.c1
-rw-r--r--server/mpm/winnt/mpm_winnt.c1
7 files changed, 14 insertions, 15 deletions
diff --git a/server/main.c b/server/main.c
index d62f001f26..f6119492ea 100644
--- a/server/main.c
+++ b/server/main.c
@@ -67,14 +67,6 @@
#include "apr_getopt.h"
#include "ap_mpm.h"
-const char *ap_server_argv0;
-
-const char *ap_server_root;
-
-ap_array_header_t *ap_server_pre_read_config;
-ap_array_header_t *ap_server_post_read_config;
-ap_array_header_t *ap_server_config_defines;
-
/* XXX - We should be able to grab the per-MPM settings here too */
static void show_compile_settings(void)
{
@@ -280,8 +272,6 @@ static void usage(process_rec *process)
destroy_and_exit_process(process, 1);
}
-ap_pool_t *g_pHookPool;
-
#ifdef WIN32
API_EXPORT(int) apache_main(int argc, char *argv[])
#else
@@ -317,8 +307,6 @@ API_EXPORT(int) main(int argc, char *argv[])
ap_util_uri_init();
- g_pHookPool=pconf;
-
ap_setup_prelinked_modules(process);
ap_create_pool(&pcommands, pglobal);
@@ -326,7 +314,9 @@ API_EXPORT(int) main(int argc, char *argv[])
ap_server_post_read_config = ap_make_array(pcommands, 1, sizeof(char *));
ap_server_config_defines = ap_make_array(pcommands, 1, sizeof(char *));
- while (ap_getopt(argc, argv, "C:c:d:f:k:vVlLth", &c, pcommands) == APR_SUCCESS) {
+ ap_run_rewrite_args(process);
+
+ while (ap_getopt(argc, argv, "C:c:D:d:f:vVlLth?", &c, pcommands) == APR_SUCCESS) {
char **new;
switch (c) {
case 'c':
@@ -340,6 +330,10 @@ API_EXPORT(int) main(int argc, char *argv[])
case 'd':
def_server_root = ap_optarg;
break;
+ case 'D':
+ new = (char **)ap_push_array(ap_server_config_defines);
+ *new = ap_pstrdup(pcommands, ap_optarg);
+ break;
case 'f':
confname = ap_optarg;
break;
@@ -359,9 +353,8 @@ API_EXPORT(int) main(int argc, char *argv[])
case 't':
configtestonly = 1;
break;
- case 'h':
- usage(process);
case '?':
+ case 'h':
usage(process);
}
}
diff --git a/server/mpm/dexter/dexter.c b/server/mpm/dexter/dexter.c
index 4eee463883..6b6a73cc19 100644
--- a/server/mpm/dexter/dexter.c
+++ b/server/mpm/dexter/dexter.c
@@ -1458,6 +1458,7 @@ LISTEN_COMMANDS
module MODULE_EXPORT_VAR mpm_dexter_module = {
MPM20_MODULE_STUFF,
+ NULL, /* hook to run before apache parses args */
dexter_pre_config, /* run hook before the configuration is read */
NULL, /* create per-directory config structure */
NULL, /* merge per-directory config structures */
diff --git a/server/mpm/mpmt_beos/mpmt_beos.c b/server/mpm/mpmt_beos/mpmt_beos.c
index 879f38e32e..260b05958a 100644
--- a/server/mpm/mpmt_beos/mpmt_beos.c
+++ b/server/mpm/mpmt_beos/mpmt_beos.c
@@ -1261,6 +1261,7 @@ LISTEN_COMMANDS
module MODULE_EXPORT_VAR mpm_mpmt_beos_module = {
MPM20_MODULE_STUFF,
+ NULL, /* hook to run before apache parses args */
mpmt_beos_pre_config, /* hook run before the configuration is read */
NULL, /* create per-directory config structure */
NULL, /* merge per-directory config structures */
diff --git a/server/mpm/mpmt_pthread/mpmt_pthread.c b/server/mpm/mpmt_pthread/mpmt_pthread.c
index 4207e96974..7b9d557de4 100644
--- a/server/mpm/mpmt_pthread/mpmt_pthread.c
+++ b/server/mpm/mpmt_pthread/mpmt_pthread.c
@@ -1477,6 +1477,7 @@ LISTEN_COMMANDS
module MODULE_EXPORT_VAR mpm_mpmt_pthread_module = {
MPM20_MODULE_STUFF,
+ NULL, /* hook to run before apache parses args */
mpmt_pthread_pre_config, /* run hook before the configuration is read */
NULL, /* create per-directory config structure */
NULL, /* merge per-directory config structures */
diff --git a/server/mpm/prefork/prefork.c b/server/mpm/prefork/prefork.c
index 755b10571f..e2e3033c82 100644
--- a/server/mpm/prefork/prefork.c
+++ b/server/mpm/prefork/prefork.c
@@ -2436,6 +2436,7 @@ LISTEN_COMMANDS
module MODULE_EXPORT_VAR mpm_prefork_module = {
MPM20_MODULE_STUFF,
+ NULL, /* hook to run before apache parses args */
prefork_pre_config, /* run hook before the configuration is read */
NULL, /* create per-directory config structure */
NULL, /* merge per-directory config structures */
diff --git a/server/mpm/spmt_os2/spmt_os2.c b/server/mpm/spmt_os2/spmt_os2.c
index ea9061480c..f35616d5f0 100644
--- a/server/mpm/spmt_os2/spmt_os2.c
+++ b/server/mpm/spmt_os2/spmt_os2.c
@@ -1671,6 +1671,7 @@ LISTEN_COMMANDS
module MODULE_EXPORT_VAR mpm_spmt_os2_module = {
MPM20_MODULE_STUFF,
+ NULL, /* hook to run before apache parses args */
spmt_os2_pre_config, /* hook run before the configuration is read */
NULL, /* create per-directory config structure */
NULL, /* merge per-directory config structures */
diff --git a/server/mpm/winnt/mpm_winnt.c b/server/mpm/winnt/mpm_winnt.c
index 698a2db7f5..99c1202747 100644
--- a/server/mpm/winnt/mpm_winnt.c
+++ b/server/mpm/winnt/mpm_winnt.c
@@ -1969,6 +1969,7 @@ LISTEN_COMMANDS
module MODULE_EXPORT_VAR mpm_winnt_module = {
MPM20_MODULE_STUFF,
+ NULL, /* hook run before arguments are parsed */
winnt_pre_config, /* hook run before configuration is read */
NULL, /* create per-directory config structure */
NULL, /* merge per-directory config structures */