From: Stefan Fritsch Date: Mon, 11 Apr 2016 19:52:35 +0000 (+0000) Subject: On exit, don't write to other generations' scoreboard slots X-Git-Tag: 2.5.0-alpha~1758 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=5643eb705db2e153328e50580fda3000236724c1;p=apache On exit, don't write to other generations' scoreboard slots git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1738632 13f79535-47bb-0310-9956-ffa450edef68 --- diff --git a/server/mpm/event/event.c b/server/mpm/event/event.c index c0d55e5d9f..453d7d370c 100644 --- a/server/mpm/event/event.c +++ b/server/mpm/event/event.c @@ -1276,12 +1276,18 @@ static void close_listeners(int process_slot, int *closed) { if (!*closed) { int i; + worker_score *ws; disable_listensocks(process_slot); ap_close_listeners_ex(my_bucket->listeners); *closed = 1; dying = 1; ap_scoreboard_image->parent[process_slot].quiescing = 1; for (i = 0; i < threads_per_child; ++i) { + ws = ap_get_scoreboard_worker_from_indexes(process_slot, i); + if (ws->pid != ap_my_pid) { + /* scoreboard slot still in use by previous generation */ + continue; + } ap_update_child_status_from_indexes(process_slot, i, SERVER_GRACEFUL, NULL); }