From: Joe Orton Date: Fri, 18 Jan 2008 20:31:28 +0000 (+0000) Subject: * server/mpm/prefork/prefork.c (child_main): If apr_pollset_poll() X-Git-Tag: 2.3.0~1021 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=9b7914b51d0e46e39b6bc054a58c9521afd2467b;p=apache * 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 --- 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