]> git.ipfire.org Git - thirdparty/apache/httpd.git/commitdiff
Fix a long delay with CGI requests and keepalive connections on
authorJeff Trawick <trawick@apache.org>
Fri, 7 Nov 2003 15:26:34 +0000 (15:26 +0000)
committerJeff Trawick <trawick@apache.org>
Fri, 7 Nov 2003 15:26:34 +0000 (15:26 +0000)
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.

One user had a page with a lot of embedded images created by
CGIs, and the browser fetched them on a keepalive connection,
and the cumulative delays were very noticeable by the clients.

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

CHANGES
modules/generators/mod_cgid.c

diff --git a/CHANGES b/CHANGES
index 3e073e40271da22d10e3f117664a3332b5f7db24..44a0cb8505b73d67e7a70840ab557782b750da7e 100644 (file)
--- a/CHANGES
+++ b/CHANGES
@@ -2,6 +2,9 @@ Changes with Apache 2.1.0-dev
 
   [Remove entries to the current 2.0 section below, when backported]
 
+  *) Fix a long delay with CGI requests and keepalive connections on
+     AIX.  [Jeff Trawick]
+
   *) Fix uninitialized gprof directory name in prefork MPM.  PR 24450.
      [Chris Knight <Christopher.D.Knight@nasa.gov>]
 
index c37e86fee1e25d33768ad2d85a17ce95fc1b6c36..233f3bfde2a32d31444cd04a0e07c754999d98a2 100644 (file)
@@ -1187,7 +1187,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);