From 5dfa1ce145b263022e471d48af94c4796a649c83 Mon Sep 17 00:00:00 2001 From: dgaudet Date: Tue, 27 Jul 1999 12:05:08 +0000 Subject: [PATCH] - get rid of pre_command_line_hook ... use register_hooks for this purpose - get rid of optreset... screw -D, use environment variables ONE_PROCESS, SHOW_HOOKS, DUMP_VHOSTS, ... at least it builds this way :) git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@83512 13f79535-47bb-0310-9956-ffa450edef68 --- modules/echo/mod_echo.c | 1 - server/mpm/dexter/dexter.c | 7 +++---- server/mpm/mpmt_pthread/mpmt_pthread.c | 7 +++---- server/mpm/prefork/prefork.c | 7 +++---- server/mpm/spmt_os2/spmt_os2.c | 7 +++---- 5 files changed, 12 insertions(+), 17 deletions(-) diff --git a/modules/echo/mod_echo.c b/modules/echo/mod_echo.c index 3ec7423a34..a4f2b3f419 100644 --- a/modules/echo/mod_echo.c +++ b/modules/echo/mod_echo.c @@ -63,7 +63,6 @@ static void register_hooks() API_VAR_EXPORT module echo_module = { STANDARD20_MODULE_STUFF, - NULL, /* pre_command_line */ NULL, /* pre_config */ NULL, /* post_config */ NULL, /* open_logs */ diff --git a/server/mpm/dexter/dexter.c b/server/mpm/dexter/dexter.c index 35a19ce7a7..a9077d3217 100644 --- a/server/mpm/dexter/dexter.c +++ b/server/mpm/dexter/dexter.c @@ -1443,7 +1443,7 @@ int ap_mpm_run(pool *_pconf, pool *plog, server_rec *s) return 0; } -static void dexter_pre_command_line(pool *pcommands) +static void dexter_hooks(void) { INIT_SIGLIST() one_process = 0; @@ -1453,7 +1453,7 @@ static void dexter_pre_config(pool *pconf, pool *plog, pool *ptemp) { static int restart_num = 0; - one_process = ap_exists_config_define("ONE_PROCESS"); + one_process = getenv("ONE_PROCESS"); /* sigh, want this only the second time around */ if (restart_num++ == 1) { @@ -1691,7 +1691,6 @@ LISTEN_COMMANDS module MODULE_VAR_EXPORT mpm_dexter_module = { STANDARD20_MODULE_STUFF, - dexter_pre_command_line, /* pre_command_line */ dexter_pre_config, /* pre_config */ NULL, /* post_config */ NULL, /* open_logs */ @@ -1704,7 +1703,7 @@ module MODULE_VAR_EXPORT mpm_dexter_module = { NULL, /* handlers */ NULL, /* check auth */ NULL, /* check access */ - NULL /* register hooks */ + dexter_hooks /* register_hooks */ }; /* force Expat to be linked into the server executable */ diff --git a/server/mpm/mpmt_pthread/mpmt_pthread.c b/server/mpm/mpmt_pthread/mpmt_pthread.c index 942987fc86..50b47215a1 100644 --- a/server/mpm/mpmt_pthread/mpmt_pthread.c +++ b/server/mpm/mpmt_pthread/mpmt_pthread.c @@ -1510,7 +1510,7 @@ int ap_mpm_run(pool *_pconf, pool *plog, server_rec *s) return 0; } -static void mpmt_pthread_pre_command_line(pool *pcommands) +static void mpmt_pthread_hooks(void) { INIT_SIGLIST() one_process = 0; @@ -1520,7 +1520,7 @@ static void mpmt_pthread_pre_config(pool *pconf, pool *plog, pool *ptemp) { static int restart_num = 0; - one_process = ap_exists_config_define("ONE_PROCESS"); + one_process = getenv("ONE_PROCESS"); /* sigh, want this only the second time around */ if (restart_num++ == 1) { @@ -1764,7 +1764,6 @@ LISTEN_COMMANDS module MODULE_VAR_EXPORT mpm_mpmt_pthread_module = { STANDARD20_MODULE_STUFF, - mpmt_pthread_pre_command_line, /* pre_command_line */ mpmt_pthread_pre_config, /* pre_config */ NULL, /* post_config */ NULL, /* open_logs */ @@ -1777,7 +1776,7 @@ module MODULE_VAR_EXPORT mpm_mpmt_pthread_module = { NULL, /* handlers */ NULL, /* check auth */ NULL, /* check access */ - NULL /* register hooks */ + mpmt_pthread_hooks /* register_hooks */ }; /* force Expat to be linked into the server executable */ diff --git a/server/mpm/prefork/prefork.c b/server/mpm/prefork/prefork.c index 57230a7bef..1d91bdc5d3 100644 --- a/server/mpm/prefork/prefork.c +++ b/server/mpm/prefork/prefork.c @@ -2859,7 +2859,7 @@ int ap_mpm_run(pool *_pconf, pool *plog, server_rec *s) return 0; } -static void prefork_pre_command_line(pool *pcommands) +static void prefork_hooks(void) { INIT_SIGLIST(); #ifdef AUX3 @@ -2872,7 +2872,7 @@ static void prefork_pre_config(pool *pconf, pool *plog, pool *ptemp) { static int restart_num = 0; - one_process = ap_exists_config_define("ONE_PROCESS"); + one_process = getenv("ONE_PROCESS"); /* sigh, want this only the second time around */ if (restart_num++ == 1) { @@ -3083,7 +3083,6 @@ LISTEN_COMMANDS module MODULE_VAR_EXPORT mpm_prefork_module = { STANDARD20_MODULE_STUFF, - prefork_pre_command_line, /* pre_command_line */ prefork_pre_config, /* pre_config */ NULL, /* post_config */ NULL, /* open_logs */ @@ -3096,5 +3095,5 @@ module MODULE_VAR_EXPORT mpm_prefork_module = { NULL, /* handlers */ NULL, /* check auth */ NULL, /* check access */ - NULL /* register hooks */ + prefork_hooks, /* register hooks */ }; diff --git a/server/mpm/spmt_os2/spmt_os2.c b/server/mpm/spmt_os2/spmt_os2.c index ffcf030cc7..ae47780904 100644 --- a/server/mpm/spmt_os2/spmt_os2.c +++ b/server/mpm/spmt_os2/spmt_os2.c @@ -1603,7 +1603,7 @@ int ap_mpm_run(pool *_pconf, pool *plog, server_rec *s) return 0; } -static void spmt_os2_pre_command_line(pool *pcommands) +static void spmt_os2_hooks(void) { INIT_SIGLIST(); /* TODO: set one_process properly */ one_process = 0; @@ -1611,7 +1611,7 @@ static void spmt_os2_pre_command_line(pool *pcommands) static void spmt_os2_pre_config(pool *pconf, pool *plog, pool *ptemp) { - one_process = ap_exists_config_define("ONE_PROCESS"); + one_process = getenv("ONE_PROCESS"); is_graceful = 0; ap_listen_pre_config(); @@ -1792,7 +1792,6 @@ LISTEN_COMMANDS module MODULE_VAR_EXPORT mpm_spmt_os2_module = { STANDARD20_MODULE_STUFF, - spmt_os2_pre_command_line, /* pre_command_line */ spmt_os2_pre_config, /* pre_config */ NULL, /* post_config */ NULL, /* open_logs */ @@ -1807,5 +1806,5 @@ module MODULE_VAR_EXPORT mpm_spmt_os2_module = { NULL, /* check access */ NULL, /* type_checker */ NULL, /* pre-run fixups */ - NULL /* register hooks */ + spmt_os2_hooks, /* register_hooks */ }; -- 2.50.1