Adjust signal handler before unblocking
* server/mpm/event/event.c: Set the new signal handler before unblocking the
signal as otherwise queued signals get delivered to the old handler
immediately when the signal is unblocked.
* server/mpm/worker/worker.c: Same thing as with event.
Submitted by: rpluem
Reviewed by: ylavic, jorton, icing
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/branches/2.4.x@
1888917 13f79535-47bb-0310-9956-
ffa450edef68
-*- coding: utf-8 -*-
Changes with Apache 2.4.47
+ *) MPM event/worker: Fix possible crash in child process on early signal
+ delivery. PR 64533. [Ruediger Pluem]
+
*) mod_http2: sync with github standalone version 1.15.17
- Log requests and sent the configured error response in case of early detected
errors like too many or too long headers. [Ruediger Pluem]
/* Unblock the signal used to wake this thread up, and set a handler for
* it.
*/
- unblock_signal(LISTENER_SIGNAL);
apr_signal(LISTENER_SIGNAL, dummy_signal_handler);
+ unblock_signal(LISTENER_SIGNAL);
for (;;) {
timer_event_t *te;
* the other threads in the process needs to take us down
* (e.g., for MaxConnectionsPerChild) it will send us SIGTERM
*/
- unblock_signal(SIGTERM);
apr_signal(SIGTERM, dummy_signal_handler);
+ unblock_signal(SIGTERM);
/* Watch for any messages from the parent over the POD */
while (1) {
rv = ap_mpm_podx_check(my_bucket->pod);
/* Unblock the signal used to wake this thread up, and set a handler for
* it.
*/
- unblock_signal(LISTENER_SIGNAL);
apr_signal(LISTENER_SIGNAL, dummy_signal_handler);
+ unblock_signal(LISTENER_SIGNAL);
/* TODO: Switch to a system where threads reuse the results from earlier
poll calls - manoj */
SERVER_STARTING, NULL);
#ifdef HAVE_PTHREAD_KILL
- unblock_signal(WORKER_SIGNAL);
apr_signal(WORKER_SIGNAL, dummy_signal_handler);
+ unblock_signal(WORKER_SIGNAL);
#endif
while (!workers_may_exit) {
* the other threads in the process needs to take us down
* (e.g., for MaxConnectionsPerChild) it will send us SIGTERM
*/
- unblock_signal(SIGTERM);
apr_signal(SIGTERM, dummy_signal_handler);
+ unblock_signal(SIGTERM);
/* Watch for any messages from the parent over the POD */
while (1) {
rv = ap_mpm_podx_check(my_bucket->pod);