From: Jim Jagielski Date: Tue, 2 Sep 2003 18:17:05 +0000 (+0000) Subject: Fix 21737 via a streamlined patch X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=cacec4f0c9423b76a33286d56cfaa838f1616c52;p=thirdparty%2Fapache%2Fhttpd.git Fix 21737 via a streamlined patch git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/branches/1.3.x@101149 13f79535-47bb-0310-9956-ffa450edef68 --- diff --git a/src/CHANGES b/src/CHANGES index 345c3a1c405..7115a108b44 100644 --- a/src/CHANGES +++ b/src/CHANGES @@ -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] diff --git a/src/main/alloc.c b/src/main/alloc.c index f3b5627061c..4201564ef0e 100644 --- a/src/main/alloc.c +++ b/src/main/alloc.c @@ -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);