From: Ryan Bloom Date: Mon, 13 Dec 1999 22:53:25 +0000 (+0000) Subject: Fix some warnings when configured with --enable-maintainer-mode. X-Git-Tag: 1.3.10~96 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=57a64feae6cd7e06d3ddb60183fc8ef4f0d0a14b;p=apache Fix some warnings when configured with --enable-maintainer-mode. ap_start_(shutdown|restart) are no longer static in dexter, because we explicitly state we are creating them to be called from places other than the parent. This is the first in a series of patches to get the 2.0 code to compile cleanly again. git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@84290 13f79535-47bb-0310-9956-ffa450edef68 --- diff --git a/include/ap_mpm.h b/include/ap_mpm.h index aedf35443a..7e021beeb2 100644 --- a/include/ap_mpm.h +++ b/include/ap_mpm.h @@ -112,6 +112,22 @@ API_EXPORT(int) ap_mpm_run(ap_context_t *pconf, ap_context_t *plog, server_rec * used by the connection loop */ API_EXPORT(int) ap_graceful_stop_signalled(void); +/* + * ap_start_shutdown() and ap_start_restart() are functions to initiate + * shutdown or restart without relying on signals. + * + * These should only be called from the parent process itself, since the + * parent process will use the shutdown_pending and restart_pending variables + * to determine whether to shutdown or restart. The child process should + * call signal_parent() directly to tell the parent to die -- this will + * cause neither of those variable to be set, which the parent will + * assume means something serious is wrong (which it will be, for the + * child to force an exit) and so do an exit anyway. + */ + +void ap_start_shutdown(void); +void ap_start_restart(int graceful); + #ifdef HAS_OTHER_CHILD /* * register an other_child -- a child which the main loop keeps track of diff --git a/server/mpm/dexter/dexter.c b/server/mpm/dexter/dexter.c index 7437fe0362..ea0c82423f 100644 --- a/server/mpm/dexter/dexter.c +++ b/server/mpm/dexter/dexter.c @@ -494,7 +494,7 @@ static int volatile is_graceful; * child to force an exit) and so do an exit anyway. */ -static void ap_start_shutdown(void) +void ap_start_shutdown(void) { if (shutdown_pending == 1) { /* Um, is this _probably_ not an error, if the user has @@ -507,7 +507,7 @@ static void ap_start_shutdown(void) } /* do a graceful restart if graceful == 1 */ -static void ap_start_restart(int graceful) +void ap_start_restart(int graceful) { if (restart_pending == 1) { diff --git a/server/mpm/mpmt_beos/mpmt_beos.h b/server/mpm/mpmt_beos/mpmt_beos.h index f19574d236..76260c1fbe 100644 --- a/server/mpm/mpmt_beos/mpmt_beos.h +++ b/server/mpm/mpmt_beos/mpmt_beos.h @@ -61,7 +61,6 @@ extern int ap_threads_per_child; extern int ap_max_requests_per_child; extern int ap_pipe_of_death[2]; -extern void clean_child_exit(int); extern int ap_extended_status; extern void clean_child_exit(int); extern int max_daemons_limit; diff --git a/server/mpm/mpmt_pthread/mpmt_pthread.c b/server/mpm/mpmt_pthread/mpmt_pthread.c index 80ff2d2541..5f71fc4447 100644 --- a/server/mpm/mpmt_pthread/mpmt_pthread.c +++ b/server/mpm/mpmt_pthread/mpmt_pthread.c @@ -181,8 +181,8 @@ API_EXPORT(int) ap_get_max_daemons(void) return max_daemons_limit; } -/* a clean exit from a child with proper cleanup - static void clean_child_exit(int code) __attribute__ ((noreturn)); */ +/* a clean exit from a child with proper cleanup */ +static void clean_child_exit(int code) __attribute__ ((noreturn)); void clean_child_exit(int code) { if (pchild) { diff --git a/server/mpm/mpmt_pthread/scoreboard.c b/server/mpm/mpmt_pthread/scoreboard.c index e1e5ebc4c4..876b8c2670 100644 --- a/server/mpm/mpmt_pthread/scoreboard.c +++ b/server/mpm/mpmt_pthread/scoreboard.c @@ -5,6 +5,7 @@ #include "http_config.h" #include "unixd.h" #include "http_conf_globals.h" +#include "mpm_status.h" #include "mpmt_pthread.h" #include "scoreboard.h" #ifdef USE_SHMGET_SCOREBOARD diff --git a/server/mpm/winnt/mpm_winnt.h b/server/mpm/winnt/mpm_winnt.h index 6cb61dfeeb..d6ea03a623 100644 --- a/server/mpm/winnt/mpm_winnt.h +++ b/server/mpm/winnt/mpm_winnt.h @@ -60,7 +60,6 @@ extern int ap_threads_per_child; extern int ap_max_requests_per_child; -extern void clean_child_exit(int); extern int ap_extended_status; extern void clean_child_exit(int);