]> git.ipfire.org Git - thirdparty/apache/httpd.git/commitdiff
Fix 21737 via a streamlined patch
authorJim Jagielski <jim@apache.org>
Tue, 2 Sep 2003 18:17:05 +0000 (18:17 +0000)
committerJim Jagielski <jim@apache.org>
Tue, 2 Sep 2003 18:17:05 +0000 (18:17 +0000)
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/branches/1.3.x@101149 13f79535-47bb-0310-9956-ffa450edef68

src/CHANGES
src/main/alloc.c

index 345c3a1c40563a6f14ae9c78f7c5e8c1dc889ea4..7115a108b440312c57a0821d815647bde15f5bb3 100644 (file)
@@ -1,5 +1,8 @@
 Changes with Apache 1.3.29
 
+  *) Prevent creation of subprocess Zombies when using CGI wrappers
+     such as suExec and cgiwrap. PR 21737. [Numerous]
+
   *) ab: Overlong credentials given via command line no longer clobber
      the buffer.  [AndrĂ© Malo]
 
index f3b5627061c2376f4e67392fb3e5daa10649d072..4201564ef0e888b1a114f412a05475cf09da79d6 100644 (file)
@@ -2859,12 +2859,10 @@ static void free_proc_chain(struct process_chain *procs)
        if ((p->kill_how == kill_after_timeout)
            || (p->kill_how == kill_only_once)) {
            /* Subprocess may be dead already.  Only need the timeout if not. */
-           if (ap_os_kill(p->pid, SIGTERM) == -1) {
-                p->kill_how = kill_never;
-            }
-            else {
-               need_timeout = 1;
-            }
+           if ( (ap_os_kill(p->pid, SIGTERM) == -1) && (errno == ESRCH) )
+               p->kill_how = kill_never;
+           else
+               need_timeout = 1;
        }
        else if (p->kill_how == kill_always) {
            kill(p->pid, SIGKILL);