From: Jim Jagielski Date: Fri, 5 Sep 2003 12:27:30 +0000 (+0000) Subject: Stupid braindamaged OSs that screw ESRCH... X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=d3f9c73dc264653b77c07b13e23dd25d3241c8f5;p=thirdparty%2Fapache%2Fhttpd.git Stupid braindamaged OSs that screw ESRCH... PR: Obtained from: Submitted by: Reviewed by: git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/branches/1.3.x@101157 13f79535-47bb-0310-9956-ffa450edef68 --- diff --git a/src/main/alloc.c b/src/main/alloc.c index 4201564ef0e..98f8af1d196 100644 --- a/src/main/alloc.c +++ b/src/main/alloc.c @@ -2858,11 +2858,14 @@ static void free_proc_chain(struct process_chain *procs) for (p = procs; p; p = p->next) { 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) && (errno == ESRCH) ) - p->kill_how = kill_never; - else - need_timeout = 1; + /* + * This is totally bogus, but seems to be the + * only portable (as in reliable) way to accomplish + * this. Note that this implies an unavoidable + * delay. + */ + ap_os_kill(p->pid, SIGTERM); + need_timeout = 1; } else if (p->kill_how == kill_always) { kill(p->pid, SIGKILL);