Hi everyone, A couple of days a go i noticed that apache2ctl uses the signal SIGWINCH to send a graceful-stop. This is obviously a very bad idea. e.g. try starting httpd -X and change your window size ;)
I am proposing to use the SIGUSR2 signal (see the diff). The first diff is for apache2 and the last one for apr. Please note that i don't know the apache or apr stuff that well. Regards, Alexander Index: include/mpm_common.h =================================================================== --- include/mpm_common.h (revision 780410) +++ include/mpm_common.h (working copy) @@ -72,13 +72,13 @@ #define AP_SIG_GRACEFUL_STRING "SIGUSR1" /* Signal used to gracefully stop */ -#define AP_SIG_GRACEFUL_STOP SIGWINCH +#define AP_SIG_GRACEFUL_STOP SIGUSR2 /* Signal used to gracefully stop (without SIG prefix) */ -#define AP_SIG_GRACEFUL_STOP_SHORT WINCH +#define AP_SIG_GRACEFUL_STOP_SHORT USR2 /* Signal used to gracefully stop (as a quoted string) */ -#define AP_SIG_GRACEFUL_STOP_STRING "SIGWINCH" +#define AP_SIG_GRACEFUL_STOP_STRING "SIGUSR2" /** * Make sure all child processes that have been spawned by the parent process Index: threadproc/unix/signals.c =================================================================== --- threadproc/unix/signals.c (revision 780413) +++ threadproc/unix/signals.c (working copy) @@ -307,13 +307,7 @@ /* the rest of the signals removed from the mask in this function * absolutely must be removed; you cannot block synchronous signals * (requirement of pthreads API) - * - * SIGUSR2 is being removed from the mask for the convenience of - * Purify users (Solaris, HP-UX, SGI) since Purify uses SIGUSR2 */ -#ifdef SIGUSR2 - sigdelset(sig_mask, SIGUSR2); -#endif } APR_DECLARE(apr_status_t) apr_signal_thread(int(*signal_handler)(int signum))