]> git.ipfire.org Git - thirdparty/apache/httpd.git/commitdiff
Allow child processes sufficient time for cleanups but making
authorJim Jagielski <jim@apache.org>
Mon, 22 Apr 2002 18:23:19 +0000 (18:23 +0000)
committerJim Jagielski <jim@apache.org>
Mon, 22 Apr 2002 18:23:19 +0000 (18:23 +0000)
ap_select in reclaim_child_processes more "resistant" to
signal interupts.

PR: Bugz 8176
Obtained from:
Submitted by: David Winterbourne <davidw@financenter.com>
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

src/CHANGES
src/main/http_main.c

index b7db39942c8c80013e1077fb6ff9364214b2bd56..559ae994627472e0fb80a2d12739ef2c1b8a1bcb 100644 (file)
@@ -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 <davidw@financenter.com>, Jim Jagielski]
+
   *) Recognize platform specific root directories (other than 
      leading slash) in mod_rewrite for filename rewrite rules.
      Bugz# 7492  [William Rowe]
index 17a940e167a7e4e69e3a4514b78f05e506b1d245..c84d2e3335124c256da3605e9edc83e5a48dcd0c 100644 (file)
@@ -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;