From: Jim Jagielski Date: Mon, 22 Apr 2002 18:23:19 +0000 (+0000) Subject: Allow child processes sufficient time for cleanups but making X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=38c76778279cf63e487b2fcd795216e32204a252;p=thirdparty%2Fapache%2Fhttpd.git Allow child processes sufficient time for cleanups but making ap_select in reclaim_child_processes more "resistant" to signal interupts. PR: Bugz 8176 Obtained from: Submitted by: David Winterbourne Reviewed by: Jim Jagielski, Bill Rowe git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/branches/1.3.x@94759 13f79535-47bb-0310-9956-ffa450edef68 --- diff --git a/src/CHANGES b/src/CHANGES index b7db39942c8..559ae994627 100644 --- a/src/CHANGES +++ b/src/CHANGES @@ -1,5 +1,10 @@ Changes with Apache 1.3.25 + *) Allow child processes sufficient time for cleanups but making + ap_select in reclaim_child_processes more "resistant" to + signal interupts. Bugz# 8176 + [David Winterbourne , Jim Jagielski] + *) Recognize platform specific root directories (other than leading slash) in mod_rewrite for filename rewrite rules. Bugz# 7492 [William Rowe] diff --git a/src/main/http_main.c b/src/main/http_main.c index 17a940e167a..c84d2e33351 100644 --- a/src/main/http_main.c +++ b/src/main/http_main.c @@ -2726,6 +2726,7 @@ static void reclaim_child_processes(int terminate) struct timeval tv; int waitret, tries; int not_dead_yet; + int ret; #ifndef NO_OTHER_CHILD other_child_rec *ocr, *nocr; #endif @@ -2735,12 +2736,15 @@ static void reclaim_child_processes(int terminate) for (tries = terminate ? 4 : 1; tries <= 12; ++tries) { /* don't want to hold up progress any more than * necessary, but we need to allow children a few moments to exit. - * Set delay with an exponential backoff. + * Set delay with an exponential backoff. NOTE: if we get + * interupted, we'll wait longer than expected... */ tv.tv_sec = waittime / 1000000; tv.tv_usec = waittime % 1000000; waittime = waittime * 4; - ap_select(0, NULL, NULL, NULL, &tv); + do { + ret = ap_select(0, NULL, NULL, NULL, &tv); + } while (ret == -1 && errno == EINTR); /* now see who is done */ not_dead_yet = 0;