From cc3ddcf9fa68477ec525d4be61abca3f1efa4ad9 Mon Sep 17 00:00:00 2001 From: Jeff Trawick Date: Mon, 12 Jan 2004 18:31:31 +0000 Subject: [PATCH] backport this fix from 2.1-dev: 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 | 3 +++ STATUS | 8 +------- modules/generators/mod_cgid.c | 10 ++++++++++ 3 files changed, 14 insertions(+), 7 deletions(-) diff --git a/CHANGES b/CHANGES index 64d601699a5..c443f1774df 100644 --- 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 8c1cc76563e..5b736091da2 100644 --- 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, diff --git a/modules/generators/mod_cgid.c b/modules/generators/mod_cgid.c index 4fdeafdb5ac..586fdcb93a2 100644 --- a/modules/generators/mod_cgid.c +++ b/modules/generators/mod_cgid.c @@ -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); -- 2.47.3