From 9b7914b51d0e46e39b6bc054a58c9521afd2467b Mon Sep 17 00:00:00 2001 From: Joe Orton Date: Fri, 18 Jan 2008 20:31:28 +0000 Subject: [PATCH] * server/mpm/prefork/prefork.c (child_main): If apr_pollset_poll() fails with EINTR and die_now has been set (indicating a graceful stop/restart), terminate the child quickly rather than re-entering poll(). git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@613260 13f79535-47bb-0310-9956-ffa450edef68 --- server/mpm/prefork/prefork.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/server/mpm/prefork/prefork.c b/server/mpm/prefork/prefork.c index ad7b6162de..1f7ca1e543 100644 --- a/server/mpm/prefork/prefork.c +++ b/server/mpm/prefork/prefork.c @@ -557,6 +557,12 @@ static void child_main(int child_num_arg) if (one_process && shutdown_pending) { return; } + else if (die_now) { + /* In graceful stop/restart; drop the mutex + * and terminate the child. */ + SAFE_ACCEPT(accept_mutex_off()); + clean_child_exit(0); + } continue; } /* Single Unix documents select as returning errnos -- 2.50.1