From: Jim Jagielski Date: Sat, 31 May 2008 11:58:46 +0000 (+0000) Subject: Merge r613260 from trunk: X-Git-Tag: 2.2.9~54 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=4ba77effab377b449e0850fc93bd52624e1fe305;p=thirdparty%2Fapache%2Fhttpd.git Merge r613260 from trunk: * 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(). Submitted by: jorton Reviewed by: jim git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/branches/2.2.x@662014 13f79535-47bb-0310-9956-ffa450edef68 --- diff --git a/STATUS b/STATUS index b751e4afbb9..d18cd95216b 100644 --- a/STATUS +++ b/STATUS @@ -90,22 +90,6 @@ RELEASE SHOWSTOPPERS: PATCHES ACCEPTED TO BACKPORT FROM TRUNK: [ start all new proposals below, under PATCHES PROPOSED. ] - * prefork: prefork's apr_pollset_poll() loop-on-EINTR loop was not checking - die_now; the child holding the mutex will not die immediately if poll - fails with EINTR, and will hence appear to "hang" until a new connection - is recevied. - Trunk version of patch: - http://svn.apache.org/viewvc?view=rev&revision=613260 - Backport version for 2.2.x of patch: - Trunk version of patch works - +1: jim, jorton, rpluem - - * prefork: Unlock mutex before terminating. - Trunk version of patch: - http://svn.apache.org/viewvc?view=rev&revision=613252 - Backport version for 2.2.x of patch: - Trunk version of patch works - +1: jim, jorton, rpluem PATCHES PROPOSED TO BACKPORT FROM TRUNK: [ New proposals should be added at the end of the list ] diff --git a/server/mpm/prefork/prefork.c b/server/mpm/prefork/prefork.c index 404686d972f..3849c222485 100644 --- a/server/mpm/prefork/prefork.c +++ b/server/mpm/prefork/prefork.c @@ -580,6 +580,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