Hi,
as you probably know, SIGWINCH is used both by terminal (emulators)
for window changes/redraw, and httpd for graceful stop (hardcoded
AFAICT).
This can cause issues when httpd is run in foreground from a terminal,
and as such (I think) is ignored in -X/ONE_PROCESS mode otherwise
gdb-ing would become quite irritating.
I'd like to be able to debug/instrument graceful stop with -X /
ONE_PROCESS though, without fearing to resize my gdb terminal or
something like that.
I suppose SIGUSR2 was not used some times ago because of its internal
usage in LinuxThreads (replaced by NPTL more than 10 years ago now),
or is/was there other systems/libcs which use SIGUSR2 for their own
purpose?
So, unless somewhere SIGUSR2 is still not a USeR available signal
nowadays, I propose that we switch to SIGUSR2, WDYT?
(There may be some tooling that uses SIGWINCH directly instead of "-k
graceful-stop", should be care?)
Could be something like the attached patch to "./configure -D
AP_SIG_GRACEFUL_STOP_SHORT=USR2 ...", or an hardcoded switch like
today...
Regards,
Yann.
Index: include/mpm_common.h
===================================================================
--- include/mpm_common.h (revision 1853992)
+++ include/mpm_common.h (working copy)
@@ -72,6 +72,7 @@ extern "C" {
/* Signal used to gracefully restart (as a quoted string) */
#define AP_SIG_GRACEFUL_STRING "SIGUSR1"
+#ifndef AP_SIG_GRACEFUL_STOP_SHORT
/* Signal used to gracefully stop */
#define AP_SIG_GRACEFUL_STOP SIGWINCH
@@ -80,6 +81,14 @@ extern "C" {
/* Signal used to gracefully stop (as a quoted string) */
#define AP_SIG_GRACEFUL_STOP_STRING "SIGWINCH"
+#else
+#define AP__SIG_TOKENIFY_(x, y) x ## y
+#define AP__SIG_TOKENIFY(y) AP__SIG_TOKENIFY_(SIG, y)
+#define AP_SIG_GRACEFUL_STOP \
+ AP__SIG_TOKENIFY(AP_SIG_GRACEFUL_STOP_SHORT)
+#define AP_SIG_GRACEFUL_STOP_STRING \
+ "SIG" APR_STRINGIFY(AP_SIG_GRACEFUL_STOP_SHORT)
+#endif
/**
* Callback function used for ap_reclaim_child_processes() and