rbb 99/12/13 14:53:26
Modified: src/include ap_mpm.h
src/modules/mpm/dexter dexter.c
src/modules/mpm/mpmt_beos mpmt_beos.h
src/modules/mpm/mpmt_pthread mpmt_pthread.c mpmt_pthread.h
scoreboard.c
src/modules/mpm/winnt winnt.h
Log:
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.
Revision Changes Path
1.7 +16 -0 apache-2.0/src/include/ap_mpm.h
Index: ap_mpm.h
===================================================================
RCS file: /home/cvs/apache-2.0/src/include/ap_mpm.h,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -r1.6 -r1.7
--- ap_mpm.h 1999/11/19 20:26:59 1.6
+++ ap_mpm.h 1999/12/13 22:53:07 1.7
@@ -112,6 +112,22 @@
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
1.62 +2 -2 apache-2.0/src/modules/mpm/dexter/dexter.c
Index: dexter.c
===================================================================
RCS file: /home/cvs/apache-2.0/src/modules/mpm/dexter/dexter.c,v
retrieving revision 1.61
retrieving revision 1.62
diff -u -r1.61 -r1.62
--- dexter.c 1999/12/03 22:11:18 1.61
+++ dexter.c 1999/12/13 22:53:11 1.62
@@ -494,7 +494,7 @@
* 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 @@
}
/* do a graceful restart if graceful == 1 */
-static void ap_start_restart(int graceful)
+void ap_start_restart(int graceful)
{
if (restart_pending == 1) {
1.3 +0 -1 apache-2.0/src/modules/mpm/mpmt_beos/mpmt_beos.h
Index: mpmt_beos.h
===================================================================
RCS file: /home/cvs/apache-2.0/src/modules/mpm/mpmt_beos/mpmt_beos.h,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- mpmt_beos.h 1999/11/02 17:29:20 1.2
+++ mpmt_beos.h 1999/12/13 22:53:15 1.3
@@ -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;
1.53 +2 -2 apache-2.0/src/modules/mpm/mpmt_pthread/mpmt_pthread.c
Index: mpmt_pthread.c
===================================================================
RCS file: /home/cvs/apache-2.0/src/modules/mpm/mpmt_pthread/mpmt_pthread.c,v
retrieving revision 1.52
retrieving revision 1.53
diff -u -r1.52 -r1.53
--- mpmt_pthread.c 1999/12/13 14:01:35 1.52
+++ mpmt_pthread.c 1999/12/13 22:53:19 1.53
@@ -181,8 +181,8 @@
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) {
1.4 +0 -1 apache-2.0/src/modules/mpm/mpmt_pthread/mpmt_pthread.h
Index: mpmt_pthread.h
===================================================================
RCS file: /home/cvs/apache-2.0/src/modules/mpm/mpmt_pthread/mpmt_pthread.h,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -r1.3 -r1.4
--- mpmt_pthread.h 1999/07/16 05:30:29 1.3
+++ mpmt_pthread.h 1999/12/13 22:53:20 1.4
@@ -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);
1.13 +1 -0 apache-2.0/src/modules/mpm/mpmt_pthread/scoreboard.c
Index: scoreboard.c
===================================================================
RCS file: /home/cvs/apache-2.0/src/modules/mpm/mpmt_pthread/scoreboard.c,v
retrieving revision 1.12
retrieving revision 1.13
diff -u -r1.12 -r1.13
--- scoreboard.c 1999/11/30 03:52:42 1.12
+++ scoreboard.c 1999/12/13 22:53:21 1.13
@@ -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
1.6 +0 -1 apache-2.0/src/modules/mpm/winnt/winnt.h
Index: winnt.h
===================================================================
RCS file: /home/cvs/apache-2.0/src/modules/mpm/winnt/winnt.h,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -r1.5 -r1.6
--- winnt.h 1999/10/19 14:55:35 1.5
+++ winnt.h 1999/12/13 22:53:25 1.6
@@ -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);