On Wed, Jul 27, 2005 at 12:59:05PM +0100, Joe Orton wrote:
> SIGUSR1 is unavailable on Linux 2.0 iff linuxthreads is used, i.e. in a
> threaded MPM. It'd be better simply to refuse to allow use of threaded
> MPMs on such platforms (which nobody will notice) and allow graceful to
> use SIGUSR1 everywhere.
>
> +1 on the patch if that much is changed.
That's even slightly easier to implement. Patch attached, though it is
rather blunt and simply disables the threaded MPM's on Linux 2.0.
I can remember there being other threading libraries for 2.0, but I
don't have a 2.0 test system and I'm not sure if that can easily be
autoconfed either.
--
Colm MacCárthaigh Public Key: [EMAIL PROTECTED]
Index: server/mpm/config.m4
===================================================================
--- server/mpm/config.m4 (revision 225483)
+++ server/mpm/config.m4 (working copy)
@@ -38,6 +38,22 @@
AC_MSG_CHECKING(checking for replacement)
AC_MSG_RESULT(prefork selected)
apache_cv_mpm=prefork
+ else
+ case $host in
+ *-linux-*)
+ case `uname -r` in
+ 2.0* )
+ dnl Threaded MPM's are not supported on Linux 2.0
+ dnl as on 2.0 the linuxthreads library uses SIGUSR1
+ dnl and SIGUSR2 internally
+ echo "Threaded MPM's are not supported on this platform"
+ AC_MSG_CHECKING(checking for replacement)
+ AC_MSG_RESULT(prefork selected)
+ apache_cv_mpm=prefork
+ ;;
+ esac
+ ;;
+ esac
fi
fi
Index: server/mpm/prefork/prefork.c
===================================================================
--- server/mpm/prefork/prefork.c (revision 225483)
+++ server/mpm/prefork/prefork.c (working copy)
@@ -104,7 +104,7 @@
/*
* The max child slot ever assigned, preserved across restarts. Necessary
- * to deal with MaxClients changes across AP_SIG_GRACEFUL restarts. We
+ * to deal with MaxClients changes across graceful restarts. We
* use this value to optimize routines that have to scan the entire scoreboard.
*/
int ap_max_daemons_limit = -1;
@@ -348,7 +348,7 @@
shutdown_pending = 1;
}
-/* restart() is the signal handler for SIGHUP and AP_SIG_GRACEFUL
+/* restart() is the signal handler for SIGHUP and SIGUSR1
* in the parent process, unless running in ONE_PROCESS mode
*/
static void restart(int sig)
@@ -358,7 +358,7 @@
return;
}
restart_pending = 1;
- is_graceful = (sig == AP_SIG_GRACEFUL);
+ is_graceful = (sig == SIGUSR1);
}
static void set_signals(void)
@@ -398,16 +398,17 @@
ap_log_error(APLOG_MARK, APLOG_WARNING, errno, ap_server_conf,
"sigaction(SIGPIPE)");
#endif
- /* we want to ignore HUPs and AP_SIG_GRACEFUL while we're busy
+ /* we want to ignore HUPs and USR1 while we're busy
* processing one
*/
sigaddset(&sa.sa_mask, SIGHUP);
- sigaddset(&sa.sa_mask, AP_SIG_GRACEFUL);
+ sigaddset(&sa.sa_mask, SIGUSR1);
sa.sa_handler = restart;
if (sigaction(SIGHUP, &sa, NULL) < 0)
ap_log_error(APLOG_MARK, APLOG_WARNING, errno, ap_server_conf,
"sigaction(SIGHUP)");
- if (sigaction(AP_SIG_GRACEFUL, &sa, NULL) < 0)
- ap_log_error(APLOG_MARK, APLOG_WARNING, errno, ap_server_conf,
"sigaction(" AP_SIG_GRACEFUL_STRING ")");
+ if (sigaction(SIGUSR1, &sa, NULL) < 0)
+ ap_log_error(APLOG_MARK, APLOG_WARNING, errno, ap_server_conf,
"sigaction(SIGUSR1)");
+
#else
if (!one_process) {
#ifdef SIGXCPU
@@ -422,9 +423,9 @@
#ifdef SIGHUP
apr_signal(SIGHUP, restart);
#endif /* SIGHUP */
-#ifdef AP_SIG_GRACEFUL
- apr_signal(AP_SIG_GRACEFUL, restart);
-#endif /* AP_SIG_GRACEFUL */
+#ifdef SIGUSR1
+ apr_signal(SIGUSR1, restart);
+#endif /* SIGUSR1 */
#ifdef SIGPIPE
apr_signal(SIGPIPE, SIG_IGN);
#endif /* SIGPIPE */
@@ -657,7 +658,7 @@
if (one_process) {
apr_signal(SIGHUP, sig_term);
- /* Don't catch AP_SIG_GRACEFUL in ONE_PROCESS mode :) */
+ /* Don't catch SIGUSR1 in ONE_PROCESS mode :) */
apr_signal(SIGINT, sig_term);
#ifdef SIGQUIT
apr_signal(SIGQUIT, SIG_DFL);
@@ -715,10 +716,10 @@
*/
apr_signal(SIGHUP, just_die);
apr_signal(SIGTERM, just_die);
- /* The child process doesn't do anything for AP_SIG_GRACEFUL.
+ /* The child process doesn't do anything for SIGUSR1.
* Instead, the pod is used for signalling graceful restart.
*/
- apr_signal(AP_SIG_GRACEFUL, SIG_IGN);
+ apr_signal(SIGUSR1, SIG_IGN);
child_main(slot);
}
@@ -947,7 +948,7 @@
/* If we're doing a graceful_restart then we're going to see a lot
* of children exiting immediately when we get into the main loop
- * below (because we just sent them AP_SIG_GRACEFUL). This happens pretty
+ * below (because we just sent them SIGUSR1). This happens pretty
* rapidly... and for each one that exits we'll start a new one until
* we reach at least daemons_min_free. But we may be permitted to
* start more than that, so we'll just keep track of how many we're
Index: server/mpm/beos/beos.c
===================================================================
--- server/mpm/beos/beos.c (revision 225483)
+++ server/mpm/beos/beos.c (working copy)
@@ -108,7 +108,7 @@
/*
* The max child slot ever assigned, preserved across restarts. Necessary
- * to deal with MaxClients changes across AP_SIG_GRACEFUL restarts. We use
+ * to deal with MaxClients changes across graceful restarts. We use
* this value to optimize routines that have to scan the entire scoreboard.
*/
int ap_max_child_assigned = -1;
@@ -226,7 +226,7 @@
static void restart(int sig)
{
- ap_start_restart(sig == AP_SIG_GRACEFUL);
+ ap_start_restart(sig == SIGUSR1);
}
/* Handle queries about our inner workings... */
@@ -385,15 +385,15 @@
if (sigaction(SIGPIPE, &sa, NULL) < 0)
ap_log_error(APLOG_MARK, APLOG_WARNING, errno, ap_server_conf,
"sigaction(SIGPIPE)");
- /* we want to ignore HUPs and AP_SIG_GRACEFUL while we're busy
+ /* we want to ignore HUPs and USR1 while we're busy
* processing one */
sigaddset(&sa.sa_mask, SIGHUP);
- sigaddset(&sa.sa_mask, AP_SIG_GRACEFUL);
+ sigaddset(&sa.sa_mask, SIGUSR1);
sa.sa_handler = restart;
if (sigaction(SIGHUP, &sa, NULL) < 0)
ap_log_error(APLOG_MARK, APLOG_WARNING, errno, ap_server_conf,
"sigaction(SIGHUP)");
- if (sigaction(AP_SIG_GRACEFUL, &sa, NULL) < 0)
- ap_log_error(APLOG_MARK, APLOG_WARNING, errno, ap_server_conf,
"sigaction(" AP_SIG_GRACEFUL_STRING ")");
+ if (sigaction(SIGUSR1, &sa, NULL) < 0)
+ ap_log_error(APLOG_MARK, APLOG_WARNING, errno, ap_server_conf,
"sigaction(SIGUSR1)");
}
/*****************************************************************
@@ -904,7 +904,7 @@
/* If we're doing a graceful_restart then we're going to see a lot
* of threads exiting immediately when we get into the main loop
- * below (because we just sent them AP_SIG_GRACEFUL). This happens
+ * below (because we just sent them SIGUSR1). This happens
* pretty rapidly... and for each one that exits we'll start a new one
* until we reach at least threads_min_free. But we may be permitted to
* start more than that, so we'll just keep track of how many we're
@@ -1003,7 +1003,7 @@
if (is_graceful) {
ap_log_error(APLOG_MARK, APLOG_NOTICE, 0, ap_server_conf,
- AP_SIG_GRACEFUL_STRING " received. Doing graceful
restart");
+ "SIGUSR1 received. Doing graceful restart");
} else {
/* Kill 'em all. Since the child acts the same on the parents SIGTERM
* and a SIGHUP, we may as well use the same signal, because some user
Index: server/mpm/worker/worker.c
===================================================================
--- server/mpm/worker/worker.c (revision 225483)
+++ server/mpm/worker/worker.c (working copy)
@@ -157,7 +157,7 @@
/*
* The max child slot ever assigned, preserved across restarts. Necessary
- * to deal with MaxClients changes across AP_SIG_GRACEFUL restarts. We
+ * to deal with MaxClients changes across graceful restarts. We
* use this value to optimize routines that have to scan the entire
* scoreboard.
*/
@@ -406,7 +406,7 @@
static void restart(int sig)
{
- ap_start_restart(sig == AP_SIG_GRACEFUL);
+ ap_start_restart(sig == SIGUSR1);
}
static void set_signals(void)
@@ -451,17 +451,17 @@
"sigaction(SIGPIPE)");
#endif
- /* we want to ignore HUPs and AP_SIG_GRACEFUL while we're busy
+ /* we want to ignore HUPs and USR1 while we're busy
* processing one */
sigaddset(&sa.sa_mask, SIGHUP);
- sigaddset(&sa.sa_mask, AP_SIG_GRACEFUL);
+ sigaddset(&sa.sa_mask, SIGUSR1);
sa.sa_handler = restart;
if (sigaction(SIGHUP, &sa, NULL) < 0)
ap_log_error(APLOG_MARK, APLOG_WARNING, errno, ap_server_conf,
"sigaction(SIGHUP)");
- if (sigaction(AP_SIG_GRACEFUL, &sa, NULL) < 0)
+ if (sigaction(SIGUSR1, &sa, NULL) < 0)
ap_log_error(APLOG_MARK, APLOG_WARNING, errno, ap_server_conf,
- "sigaction(" AP_SIG_GRACEFUL_STRING ")");
+ "sigaction(SIGUSR1)");
#else
if (!one_process) {
#ifdef SIGXCPU
@@ -476,9 +476,9 @@
#ifdef SIGHUP
apr_signal(SIGHUP, restart);
#endif /* SIGHUP */
-#ifdef AP_SIG_GRACEFUL
- apr_signal(AP_SIG_GRACEFUL, restart);
-#endif /* AP_SIG_GRACEFUL */
+#ifdef SIGUSR1
+ apr_signal(SIGUSR1, restart);
+#endif /* SIGUSR1 */
#ifdef SIGPIPE
apr_signal(SIGPIPE, SIG_IGN);
#endif /* SIGPIPE */
@@ -1676,7 +1676,7 @@
/* If we're doing a graceful_restart then we're going to see a lot
* of children exiting immediately when we get into the main loop
- * below (because we just sent them AP_SIG_GRACEFUL). This happens pretty
+ * below (because we just sent them SIGUSR1). This happens pretty
* rapidly... and for each one that exits we'll start a new one until
* we reach at least daemons_min_free. But we may be permitted to
* start more than that, so we'll just keep track of how many we're
@@ -1755,7 +1755,7 @@
if (is_graceful) {
ap_log_error(APLOG_MARK, APLOG_NOTICE, 0, ap_server_conf,
- AP_SIG_GRACEFUL_STRING " received. Doing graceful
restart");
+ "SIGUSR1 received. Doing graceful restart");
/* wake up the children...time to die. But we'll have more soon */
ap_mpm_pod_killpg(pod, ap_daemons_limit, TRUE);
Index: server/mpm/experimental/threadpool/threadpool.c
===================================================================
--- server/mpm/experimental/threadpool/threadpool.c (revision 225483)
+++ server/mpm/experimental/threadpool/threadpool.c (working copy)
@@ -154,7 +154,7 @@
/*
* The max child slot ever assigned, preserved across restarts. Necessary
- * to deal with MaxClients changes across AP_SIG_GRACEFUL restarts. We
+ * to deal with MaxClients changes across graceful restarts. We
* use this value to optimize routines that have to scan the entire
* scoreboard.
*/
@@ -566,7 +566,7 @@
static void restart(int sig)
{
- ap_start_restart(sig == AP_SIG_GRACEFUL);
+ ap_start_restart(sig == SIGUSR1);
}
static void set_signals(void)
@@ -611,17 +611,17 @@
"sigaction(SIGPIPE)");
#endif
- /* we want to ignore HUPs and AP_SIG_GRACEFUL while we're busy
+ /* we want to ignore HUPs and USR1 while we're busy
* processing one */
sigaddset(&sa.sa_mask, SIGHUP);
- sigaddset(&sa.sa_mask, AP_SIG_GRACEFUL);
+ sigaddset(&sa.sa_mask, SIGUSR1);
sa.sa_handler = restart;
if (sigaction(SIGHUP, &sa, NULL) < 0)
ap_log_error(APLOG_MARK, APLOG_WARNING, errno, ap_server_conf,
"sigaction(SIGHUP)");
- if (sigaction(AP_SIG_GRACEFUL, &sa, NULL) < 0)
+ if (sigaction(SIGUSR1, &sa, NULL) < 0)
ap_log_error(APLOG_MARK, APLOG_WARNING, errno, ap_server_conf,
- "sigaction(" AP_SIG_GRACEFUL_STRING ")");
+ "sigaction(SIGUSR1)");
#else
if (!one_process) {
#ifdef SIGXCPU
@@ -636,9 +636,9 @@
#ifdef SIGHUP
apr_signal(SIGHUP, restart);
#endif /* SIGHUP */
-#ifdef AP_SIG_GRACEFUL
- apr_signal(AP_SIG_GRACEFUL, restart);
-#endif /* AP_SIG_GRACEFUL */
+#ifdef SIGUSR1
+ apr_signal(SIGUSR1, restart);
+#endif /* SIGUSR1 */
#ifdef SIGPIPE
apr_signal(SIGPIPE, SIG_IGN);
#endif /* SIGPIPE */
@@ -1756,7 +1756,7 @@
/* If we're doing a graceful_restart then we're going to see a lot
* of children exiting immediately when we get into the main loop
- * below (because we just sent them AP_SIG_GRACEFUL). This happens pretty
+ * below (because we just sent them SIGUSR1). This happens pretty
* rapidly... and for each one that exits we'll start a new one until
* we reach at least daemons_min_free. But we may be permitted to
* start more than that, so we'll just keep track of how many we're
@@ -1835,7 +1835,7 @@
if (is_graceful) {
ap_log_error(APLOG_MARK, APLOG_NOTICE, 0, ap_server_conf,
- AP_SIG_GRACEFUL_STRING " received. Doing graceful
restart");
+ "SIGUSR1 received. Doing graceful restart");
/* wake up the children...time to die. But we'll have more soon */
ap_mpm_pod_killpg(pod, ap_daemons_limit, TRUE);
Index: server/mpm/experimental/event/event.c
===================================================================
--- server/mpm/experimental/event/event.c (revision 225483)
+++ server/mpm/experimental/event/event.c (working copy)
@@ -204,7 +204,7 @@
/*
* The max child slot ever assigned, preserved across restarts. Necessary
- * to deal with MaxClients changes across AP_SIG_GRACEFUL restarts. We
+ * to deal with MaxClients changes across graceful restarts. We
* use this value to optimize routines that have to scan the entire
* scoreboard.
*/
@@ -448,7 +448,7 @@
static void restart(int sig)
{
- ap_start_restart(sig == AP_SIG_GRACEFUL);
+ ap_start_restart(sig == SIGUSR1);
}
static void set_signals(void)
@@ -493,17 +493,17 @@
"sigaction(SIGPIPE)");
#endif
- /* we want to ignore HUPs and AP_SIG_GRACEFUL while we're busy
+ /* we want to ignore HUPs and USR1 while we're busy
* processing one */
sigaddset(&sa.sa_mask, SIGHUP);
- sigaddset(&sa.sa_mask, AP_SIG_GRACEFUL);
+ sigaddset(&sa.sa_mask, SIGUSR1);
sa.sa_handler = restart;
if (sigaction(SIGHUP, &sa, NULL) < 0)
ap_log_error(APLOG_MARK, APLOG_WARNING, errno, ap_server_conf,
"sigaction(SIGHUP)");
- if (sigaction(AP_SIG_GRACEFUL, &sa, NULL) < 0)
+ if (sigaction(SIGUSR1, &sa, NULL) < 0)
ap_log_error(APLOG_MARK, APLOG_WARNING, errno, ap_server_conf,
- "sigaction(" AP_SIG_GRACEFUL_STRING ")");
+ "sigaction(SIGUSR1)");
#else
if (!one_process) {
#ifdef SIGXCPU
@@ -518,9 +518,9 @@
#ifdef SIGHUP
apr_signal(SIGHUP, restart);
#endif /* SIGHUP */
-#ifdef AP_SIG_GRACEFUL
- apr_signal(AP_SIG_GRACEFUL, restart);
-#endif /* AP_SIG_GRACEFUL */
+#ifdef SIGUSR1
+ apr_signal(SIGUSR1, restart);
+#endif /* SIGUSR1 */
#ifdef SIGPIPE
apr_signal(SIGPIPE, SIG_IGN);
#endif /* SIGPIPE */
@@ -1892,7 +1892,7 @@
/* If we're doing a graceful_restart then we're going to see a lot
* of children exiting immediately when we get into the main loop
- * below (because we just sent them AP_SIG_GRACEFUL). This happens pretty
+ * below (because we just sent them SIGUSR1). This happens pretty
* rapidly... and for each one that exits we'll start a new one until
* we reach at least daemons_min_free. But we may be permitted to
* start more than that, so we'll just keep track of how many we're
@@ -1966,8 +1966,7 @@
if (is_graceful) {
ap_log_error(APLOG_MARK, APLOG_NOTICE, 0, ap_server_conf,
- AP_SIG_GRACEFUL_STRING
- " received. Doing graceful restart");
+ "SIGUSR1 received. Doing graceful restart");
/* wake up the children...time to die. But we'll have more soon */
ap_mpm_pod_killpg(pod, ap_daemons_limit, TRUE);
Index: server/mpm/experimental/perchild/perchild.c
===================================================================
--- server/mpm/experimental/perchild/perchild.c (revision 225483)
+++ server/mpm/experimental/perchild/perchild.c (working copy)
@@ -166,7 +166,7 @@
/*
* The max child slot ever assigned, preserved across restarts. Necessary
- * to deal with NumServers changes across AP_SIG_GRACEFUL restarts. We
+ * to deal with NumServers changes across graceful restarts. We
* use this value to optimize routines that have to scan the entire child
* table.
*
@@ -351,7 +351,7 @@
static void restart(int sig)
{
#ifndef WIN32
- ap_start_restart(sig == AP_SIG_GRACEFUL);
+ ap_start_restart(sig == SIGUSR1);
#else
ap_start_restart(1);
#endif
@@ -399,17 +399,17 @@
"sigaction(SIGPIPE)");
#endif
- /* we want to ignore HUPs and AP_SIG_GRACEFUL while we're busy
+ /* we want to ignore HUPs and USR1 while we're busy
* processing one */
sigaddset(&sa.sa_mask, SIGHUP);
- sigaddset(&sa.sa_mask, AP_SIG_GRACEFUL);
+ sigaddset(&sa.sa_mask, SIGUSR1);
sa.sa_handler = restart;
if (sigaction(SIGHUP, &sa, NULL) < 0)
ap_log_error(APLOG_MARK, APLOG_WARNING, errno, ap_server_conf,
"sigaction(SIGHUP)");
- if (sigaction(AP_SIG_GRACEFUL, &sa, NULL) < 0)
+ if (sigaction(SIGUSR1, &sa, NULL) < 0)
ap_log_error(APLOG_MARK, APLOG_WARNING, errno, ap_server_conf,
- "sigaction(" AP_SIG_GRACEFUL_STRING ")");
+ "sigaction(SIGUSR1)");
#else
if (!one_process) {
#ifdef SIGXCPU
@@ -424,9 +424,9 @@
#ifdef SIGHUP
apr_signal(SIGHUP, restart);
#endif /* SIGHUP */
-#ifdef AP_SIG_GRACEFUL
- apr_signal(AP_SIG_GRACEFUL, restart);
-#endif /* AP_SIG_GRACEFUL */
+#ifdef SIGUSR1
+ apr_signal(SIGUSR1, restart);
+#endif /* SIGUSR1 */
#ifdef SIGPIPE
apr_signal(SIGPIPE, SIG_IGN);
#endif /* SIGPIPE */
@@ -1295,7 +1295,7 @@
/* If we're doing a graceful_restart then we're going to see a lot
* of children exiting immediately when we get into the main loop
- * below (because we just sent them AP_SIG_GRACEFUL). This happens
+ * below (because we just sent them SIGUSR1). This happens
* pretty rapidly... and for each one that exits we'll start a new one
* until we reach at least daemons_min_free. But we may be permitted to
* start more than that, so we'll just keep track of how many we're
@@ -1365,9 +1365,8 @@
if (is_graceful) {
char char_of_death = '!';
- ap_log_error(APLOG_MARK, APLOG_NOTICE, 0,
- ap_server_conf, AP_SIG_GRACEFUL_STRING " received. "
- "Doing graceful restart");
+ ap_log_error(APLOG_MARK, APLOG_NOTICE, 0, ap_server_conf,
+ "SIGUSR1 received. Doing graceful restart");
/* This is mostly for debugging... so that we know what is still
* gracefully dealing with existing request.
Index: server/mpm/experimental/leader/leader.c
===================================================================
--- server/mpm/experimental/leader/leader.c (revision 225483)
+++ server/mpm/experimental/leader/leader.c (working copy)
@@ -149,7 +149,7 @@
/*
* The max child slot ever assigned, preserved across restarts. Necessary
- * to deal with MaxClients changes across AP_SIG_GRACEFUL restarts. We
+ * to deal with MaxClients changes across graceful restarts. We
* use this value to optimize routines that have to scan the entire
* scoreboard.
*/
@@ -495,7 +495,7 @@
static void restart(int sig)
{
- ap_start_restart(sig == AP_SIG_GRACEFUL);
+ ap_start_restart(sig == SIGUSR1);
}
static void set_signals(void)
@@ -540,17 +540,17 @@
"sigaction(SIGPIPE)");
#endif
- /* we want to ignore HUPs and AP_SIG_GRACEFUL while we're busy
+ /* we want to ignore HUPs and USR1 while we're busy
* processing one */
sigaddset(&sa.sa_mask, SIGHUP);
- sigaddset(&sa.sa_mask, AP_SIG_GRACEFUL);
+ sigaddset(&sa.sa_mask, SIGUSR1);
sa.sa_handler = restart;
if (sigaction(SIGHUP, &sa, NULL) < 0)
ap_log_error(APLOG_MARK, APLOG_WARNING, errno, ap_server_conf,
"sigaction(SIGHUP)");
- if (sigaction(AP_SIG_GRACEFUL, &sa, NULL) < 0)
+ if (sigaction(SIGUSR1, &sa, NULL) < 0)
ap_log_error(APLOG_MARK, APLOG_WARNING, errno, ap_server_conf,
- "sigaction(" AP_SIG_GRACEFUL_STRING ")");
+ "sigaction(SIGUSR1)");
#else
if (!one_process) {
#ifdef SIGXCPU
@@ -565,9 +565,9 @@
#ifdef SIGHUP
apr_signal(SIGHUP, restart);
#endif /* SIGHUP */
-#ifdef AP_SIG_GRACEFUL
- apr_signal(AP_SIG_GRACEFUL, restart);
-#endif /* AP_SIG_GRACEFUL */
+#ifdef SIGUSR1
+ apr_signal(SIGUSR1, restart);
+#endif /* SIGUSR1 */
#ifdef SIGPIPE
apr_signal(SIGPIPE, SIG_IGN);
#endif /* SIGPIPE */
@@ -1507,7 +1507,7 @@
/* If we're doing a graceful_restart then we're going to see a lot
* of children exiting immediately when we get into the main loop
- * below (because we just sent them AP_SIG_GRACEFUL). This happens pretty
+ * below (because we just sent them SIGUSR1). This happens pretty
* rapidly... and for each one that exits we'll start a new one until
* we reach at least daemons_min_free. But we may be permitted to
* start more than that, so we'll just keep track of how many we're
@@ -1588,7 +1588,7 @@
if (is_graceful) {
ap_log_error(APLOG_MARK, APLOG_NOTICE, 0, ap_server_conf,
- AP_SIG_GRACEFUL_STRING " received. Doing graceful
restart");
+ "SIGUSR1 received. Doing graceful restart");
/* wake up the children...time to die. But we'll have more soon */
ap_mpm_pod_killpg(pod, ap_daemons_limit);
Index: server/mpm_common.c
===================================================================
--- server/mpm_common.c (revision 225483)
+++ server/mpm_common.c (working copy)
@@ -351,7 +351,7 @@
switch (signum) {
case SIGTERM:
case SIGHUP:
- case AP_SIG_GRACEFUL:
+ case SIGUSR1:
case SIGKILL:
break;
Index: server/log.c
===================================================================
--- server/log.c (revision 225483)
+++ server/log.c (working copy)
@@ -687,7 +687,7 @@
mypid = getpid();
if (mypid != saved_pid
&& apr_stat(&finfo, fname, APR_FINFO_MTIME, p) == APR_SUCCESS) {
- /* AP_SIG_GRACEFUL and HUP call this on each restart.
+ /* USR1 and HUP call this on each restart.
* Only warn on first time through for this pid.
*
* XXX: Could just write first time through too, although
Index: modules/mappers/mod_so.c
===================================================================
--- modules/mappers/mod_so.c (revision 225483)
+++ modules/mappers/mod_so.c (working copy)
@@ -17,8 +17,8 @@
/*
* This module is used to load Apache modules at runtime. This means that the
* server functionality can be extended without recompiling and even without
- * taking the server down at all. Only a HUP or AP_SIG_GRACEFUL signal
- * needs to be sent to the server to reload the dynamically loaded modules.
+ * taking the server down at all. Only a HUP or USR1 signal needs to be sent
+ * to the server to reload the dynamically loaded modules.
*
* To use, you'll first need to build your module as a shared library, then
* update your configuration (httpd.conf) to get the Apache core to load the
@@ -56,9 +56,9 @@
* directive to get these log messages).
*
* If you edit the LoadModule directives while the server is live you can get
- * Apache to re-load the modules by sending it a HUP or AP_SIG_GRACEFUL
- * signal as normal. You can use this to dynamically change the capability
- * of your server without bringing it down.
+ * Apache to re-load the modules by sending it a HUP or USR1 signal as normal.
+ * You can use this to dynamically change the capability of your server
+ * without bringing it down.
*
* Because currently there is only limited builtin support in the Configure
* script for creating the shared library files (`.so'), please consult your
Index: configure.in
===================================================================
--- configure.in (revision 225483)
+++ configure.in (working copy)
@@ -232,8 +232,6 @@
APACHE_SUBST(SHLTCFLAGS)
APACHE_SUBST(LTCFLAGS)
-AP_SIG_GRACEFUL=USR1
-
case $host in
*-apple-aux3*)
APR_SETVAR(APACHE_MPM, [prefork])
@@ -249,9 +247,6 @@
;;
*-linux-*)
case `uname -r` in
- 2.0* )
- AP_SIG_GRACEFUL=WINCH
- ;;
2.[[2-9]]* )
APR_SETVAR(SINGLE_LISTEN_UNSERIALIZED_ACCEPT, [1])
;;
@@ -575,14 +570,6 @@
[Listening sockets are non-blocking when there are more than 1])
fi
-AC_DEFINE_UNQUOTED(AP_SIG_GRACEFUL, SIG$AP_SIG_GRACEFUL, [Signal used to
gracefully restart])
-AC_DEFINE_UNQUOTED(AP_SIG_GRACEFUL_STRING, "SIG$AP_SIG_GRACEFUL", [Signal used
to gracefully restart (as a quoted string)])
-AC_DEFINE_UNQUOTED(AP_SIG_GRACEFUL_SHORT, $AP_SIG_GRACEFUL, [Signal used to
gracefully restart (without SIG prefix)])
-AP_SIG_GRACEFUL_SHORT=$AP_SIG_GRACEFUL
-AP_SIG_GRACEFUL=SIG$AP_SIG_GRACEFUL_SHORT
-AC_SUBST(AP_SIG_GRACEFUL)
-AC_SUBST(AP_SIG_GRACEFUL_STRING)
-AC_SUBST(AP_SIG_GRACEFUL_SHORT)
APACHE_FAST_OUTPUT(Makefile modules/Makefile srclib/Makefile)
APACHE_FAST_OUTPUT(os/Makefile server/Makefile)