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
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
* 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
}
/* do a graceful restart if graceful == 1 */
-static void ap_start_restart(int graceful)
+void ap_start_restart(int graceful)
{
if (restart_pending == 1) {
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;
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) {
#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
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);