From e7189d6d11d5f3dfa6989d770da3e7e2d1648ada Mon Sep 17 00:00:00 2001 From: Jim Jagielski Date: Mon, 6 Aug 2007 14:08:37 +0000 Subject: [PATCH] Aha! This explains some of the weird things I was seeing. Pull down and fold in patch from r109510 for event.c git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@563144 13f79535-47bb-0310-9956-ffa450edef68 --- server/mpm/experimental/event/event.c | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/server/mpm/experimental/event/event.c b/server/mpm/experimental/event/event.c index 3dbf39a937..f8b5032149 100644 --- a/server/mpm/experimental/event/event.c +++ b/server/mpm/experimental/event/event.c @@ -1650,6 +1650,21 @@ static int make_child(server_rec * s, int slot) clean_child_exit(0); } /* else */ + if (ap_scoreboard_image->parent[slot].pid != 0) { + /* This new child process is squatting on the scoreboard + * entry owned by an exiting child process, which cannot + * exit until all active requests complete. + * Don't forget about this exiting child process, or we + * won't be able to kill it if it doesn't exit by the + * time the server is shut down. + */ + ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, ap_server_conf, + "taking over scoreboard slot from %" APR_PID_T_FMT "%s", + ap_scoreboard_image->parent[slot].pid, + ap_scoreboard_image->parent[slot].quiescing ? + " (quiescing)" : ""); + ap_register_extra_mpm_process(ap_scoreboard_image->parent[slot].pid); + } ap_scoreboard_image->parent[slot].quiescing = 0; ap_scoreboard_image->parent[slot].pid = pid; return 0; @@ -1907,6 +1922,9 @@ static void server_main_loop(int remaining_children_to_start) make_child(ap_server_conf, child_slot); --remaining_children_to_start; } + } + else if (ap_unregister_extra_mpm_process(pid.pid) == 1) { + /* handled */ #if APR_HAS_OTHER_CHILD } else if (apr_proc_other_child_alert(&pid, APR_OC_REASON_DEATH, -- 2.40.0