From: Jim Jagielski Date: Mon, 6 Aug 2007 14:08:37 +0000 (+0000) Subject: Aha! This explains some of the weird things I was seeing. X-Git-Tag: 2.3.0~1641 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=e7189d6d11d5f3dfa6989d770da3e7e2d1648ada;p=thirdparty%2Fapache%2Fhttpd.git 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 --- diff --git a/server/mpm/experimental/event/event.c b/server/mpm/experimental/event/event.c index 3dbf39a9373..f8b50321496 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,