]> git.ipfire.org Git - thirdparty/apache/httpd.git/commitdiff
Stupid braindamaged OSs that screw ESRCH...
authorJim Jagielski <jim@apache.org>
Fri, 5 Sep 2003 12:27:30 +0000 (12:27 +0000)
committerJim Jagielski <jim@apache.org>
Fri, 5 Sep 2003 12:27:30 +0000 (12:27 +0000)
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

src/main/alloc.c

index 4201564ef0e888b1a114f412a05475cf09da79d6..98f8af1d19643d757539616e5590ef0044318796 100644 (file)
@@ -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);