]> granicus.if.org Git - apache/commitdiff
Fix some warnings when configured with --enable-maintainer-mode.
authorRyan Bloom <rbb@apache.org>
Mon, 13 Dec 1999 22:53:25 +0000 (22:53 +0000)
committerRyan Bloom <rbb@apache.org>
Mon, 13 Dec 1999 22:53:25 +0000 (22:53 +0000)
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

include/ap_mpm.h
server/mpm/dexter/dexter.c
server/mpm/mpmt_beos/mpmt_beos.h
server/mpm/mpmt_pthread/mpmt_pthread.c
server/mpm/mpmt_pthread/scoreboard.c
server/mpm/winnt/mpm_winnt.h

index aedf35443a716c6a43efc44a4a8a4c09fd48d0ba..7e021beeb24b80dc07c7d9bfcaa93bc4c73c5936 100644 (file)
@@ -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
index 7437fe03620f48e4e8bed36640fb0b2cbb2afff5..ea0c82423fb059f9c72bdffa1123ea07fa526d15 100644 (file)
@@ -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) {
index f19574d236d7d95a5df3c2b4909f87b73f6b20f3..76260c1fbeb3b3e3a3356d282c32ed3cbb8ee2bc 100644 (file)
@@ -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;
index 80ff2d25416399bd848261b5ae3ab8eb5b17f73b..5f71fc44477e7b7c1f89b1910b20555b135a9a07 100644 (file)
@@ -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) {
index e1e5ebc4c40575e697de9153e035fd10d65a1642..876b8c26705282735615f365db89df9aa1507508 100644 (file)
@@ -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
index 6cb61dfeeb3c145b18ca62be8e4c158464ff2998..d6ea03a623c2234dc123614e93b5d6de98b5486d 100644 (file)
@@ -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);