]> git.ipfire.org Git - thirdparty/apache/httpd.git/commitdiff
backport this fix from 2.1-dev:
authorJeff Trawick <trawick@apache.org>
Mon, 12 Jan 2004 18:31:31 +0000 (18:31 +0000)
committerJeff Trawick <trawick@apache.org>
Mon, 12 Jan 2004 18:31:31 +0000 (18:31 +0000)
     Fix a long delay with CGI requests and keepalive connections on
     AIX.

Reviewed by: stoddard, jerenkrantz

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/branches/APACHE_2_0_BRANCH@102297 13f79535-47bb-0310-9956-ffa450edef68

CHANGES
STATUS
modules/generators/mod_cgid.c

diff --git a/CHANGES b/CHANGES
index 64d601699a574c63351cb0ef0dd31a5e49713b24..c443f1774dfb5326882bae8c534125a4a3f178a4 100644 (file)
--- a/CHANGES
+++ b/CHANGES
@@ -1,5 +1,8 @@
 Changes with Apache 2.0.49
 
+  *) Fix a long delay with CGI requests and keepalive connections on
+     AIX.  [Jeff Trawick]
+
   *) mod_autoindex: Add 'XHTML' option in order to allow switching between
      HTML 3.2 and XHTML 1.0 output. PR 23747.  [AndrĂ© Malo]
 
diff --git a/STATUS b/STATUS
index 8c1cc76563e61ba931ad9d13647e9182db311691..5b736091da2116e5c6a746fe434c741c2bc166a7 100644 (file)
--- a/STATUS
+++ b/STATUS
@@ -1,5 +1,5 @@
 APACHE 2.0 STATUS:                                              -*-text-*-
-Last modified at [$Date: 2004/01/12 15:54:35 $]
+Last modified at [$Date: 2004/01/12 18:31:30 $]
 
 Release:
 
@@ -298,12 +298,6 @@ PATCHES TO BACKPORT FROM 2.1
         modules/experimental/cache_cache.c r1.5
       +1: jwoolley, bnicholes, rederpj
 
-    * Fix a long delay with CGI requests and keepalive connections on
-      AIX.
-        modules/generators/mod_cgid.c r1.159
-      jerenkrantz: Could we do this on other platforms, too?
-      +1: trawick, stoddard, jerenkrantz
-
 CURRENT RELEASE NOTES:
 
     * Backwards compatibility is expected of future Apache 2.0 releases,
index 4fdeafdb5ac37de20ead91147ae95a0ff9bd112d..586fdcb93a290ea76c018c5e60ed1323d7aa342a 100644 (file)
@@ -1161,7 +1161,17 @@ static apr_status_t dead_yet(pid_t pid, apr_interval_time_t max_wait)
     apr_interval_time_t total = 0;
 
     do {
+#ifdef _AIX
+        /* On AIX, for processes like mod_cgid's script children where
+         * SIGCHLD is ignored, kill(pid,0) returns success for up to
+         * one second after the script child exits, based on when a
+         * daemon runs to clean up unnecessary process table entries.
+         * getpgid() can report the proper info (-1/ESRCH) immediately.
+         */
+        if (getpgid(pid) < 0) {
+#else
         if (kill(pid, 0) < 0) {
+#endif
             return APR_SUCCESS;
         }
         apr_sleep(interval);