Received: (from majordom@localhost) by hyperreal.org (8.8.5/8.8.5) id SAA01313; Fri, 3 Oct 1997 18:21:09 -0700 (PDT) Received: from twinlark.arctic.org (twinlark.arctic.org [204.62.130.91]) by hyperreal.org (8.8.5/8.8.5) with SMTP id SAA01277 for ; Fri, 3 Oct 1997 18:21:02 -0700 (PDT) Received: (qmail 25542 invoked by uid 500); 4 Oct 1997 01:21:21 -0000 Date: Fri, 3 Oct 1997 18:21:21 -0700 (PDT) From: Dean Gaudet To: new-httpd@apache.org Subject: [PATCH] Brian's nph stuck in graceful bug Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: new-httpd-owner@apache.org Precedence: bulk Reply-To: new-httpd@apache.org Status: O X-Status: The child that invokes the nph cgi does time out properly, but then gets stuck waiting on the child forever because of a waitpid() in the cgi_handler. This problem exists in all previous versions of apache as well. But they have no way of solving it -- since they have no idea how much traffic has gone over the nph socket they don't know if it should be timed out. The nph cgi really has to deal with the timeout. But, in 1.3 since we relay all the output anyhow, we can skip this extra waitpid() and clean up the nph cgi just like any old cgi (i.e. SIGTERM, wait 3 seconds, SIGKILL). Patch below. Dean --- ../../apachen2/src/modules/standard/mod_cgi.c Thu Sep 25 20:53:29 1997 +++ modules/standard/mod_cgi.c Fri Oct 3 18:11:34 1997 @@ -535,9 +535,6 @@ if (script_in && nph) { send_fb(script_in, r); -#if !defined(__EMX__) && !defined(WIN32) - waitpid(child_pid, (int *) 0, 0); -#endif } return OK; /* NOT r->status, even if it has changed. */