Browse Source

fix suexec-zombie problem, see also http://nagoya.apache.org/bugzilla/show_bug.cgi?id=21737

Michael van Elst 23 years ago
parent
commit
d459dc598a
2 changed files with 22 additions and 1 deletions
  1. 21 0
      apache/apache.patch
  2. 1 1
      apache/apache.spec

+ 21 - 0
apache/apache.patch

@@ -44,3 +44,24 @@
  	    SHLIB_SUFFIX_DEPTH=1
  	    ;;
  	*-sunos4*)
+--- apache_1.3.28/src/main/alloc.c.dist	2003-07-29 15:23:08.000000000 +0200
++++ apache_1.3.28/src/main/alloc.c	2003-07-29 15:25:08.000000000 +0200
+@@ -2858,13 +2858,11 @@
+     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) {
+-                p->kill_how = kill_never;
+-            }
+-            else {
+-		need_timeout = 1;
+-            }
++	    /* Dead subprocesses still need a waitpid to remove the zombie
++             * so we have to ignore errors returned by ap_os_kill()
++             */
++	    ap_os_kill(p->pid, SIGTERM);
++	    need_timeout = 1;
+ 	}
+ 	else if (p->kill_how == kill_always) {
+ 	    kill(p->pid, SIGKILL);

+ 1 - 1
apache/apache.spec

@@ -60,7 +60,7 @@ Distribution: OpenPKG [BASE]
 Group:        Web
 License:      ASF
 Version:      %{V_apache}
-Release:      20030723
+Release:      20030729
 
 #   package options (suexec related)
 %option       with_suexec               yes