httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Dean Gaudet <dgau...@arctic.org>
Subject [PATCH] Brian's nph stuck in graceful bug
Date Sat, 04 Oct 1997 01:21:21 GMT
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. */






Mime
View raw message