X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=lib%2FFCGI%2FProcManager.pm;h=d6c0df611bd38d1ee4fe5334445bb6020c1deb55;hb=b48455f15f414c83e9d500026a4f41cb3a086e23;hp=8ce50f59fd93f42a79b4e51bfd51d69d5013bb69;hpb=6e8b04f778a9129e5caf07c2d60a074e5bac4070;p=catagits%2FFCGI-ProcManager.git diff --git a/lib/FCGI/ProcManager.pm b/lib/FCGI/ProcManager.pm index 8ce50f5..d6c0df6 100644 --- a/lib/FCGI/ProcManager.pm +++ b/lib/FCGI/ProcManager.pm @@ -81,7 +81,7 @@ insert a call to C at the top of the loop, and then FCGI::ProcManager attempts to do the right thing for proper shutdowns now. When it receives a SIGHUP, it sends a SIGTERM to each of its children, and -then resumes its normal operations. +then resumes its normal operations. When it receives a SIGTERM, it sends a SIGTERM to each of its children, sets an alarm(3) "die timeout" handler, and waits for each of its children to @@ -91,24 +91,10 @@ occurs, the process manager sends a SIGKILL to each of the remaining children, and exists with return status 1. In order to get FastCGI servers to exit upon receiving a signal, it is -necessary to use its FAIL_ACCEPT_ON_INTR. See FCGI.pm's description of -FAIL_ACCEPT_ON_INTR. Unfortunately, if you want/need to use CGI::Fast, it -appears currently necessary to modify your installation of FCGI.pm, with -something like the following: - - -*- patch -*- - --- FCGI.pm 2001/03/09 01:44:00 1.1.1.3 - +++ FCGI.pm 2001/03/09 01:47:32 1.2 - @@ -24,7 +24,7 @@ - *FAIL_ACCEPT_ON_INTR = sub() { 1 }; - - sub Request(;***$$$) { - - my @defaults = (\*STDIN, \*STDOUT, \*STDERR, \%ENV, 0, 0); - + my @defaults = (\*STDIN, \*STDOUT, \*STDERR, \%ENV, 0, FAIL_ACCEPT_ON_INTR()); - splice @defaults,0,@_,@_; - RequestX(@defaults); - } - -*- end patch -*- +necessary to use its FAIL_ACCEPT_ON_INTR. See L's description of +FAIL_ACCEPT_ON_INTR. Unfortunately, if you want/need to use L, it +is currently necessary to run the latest (at the time of writing) development +version of FCGI.pm. (>= 0.71_02) Otherwise, if you don't, there is a loop around accept(2) which prevents os_unix.c OS_Accept() from returning the necessary error when FastCGI @@ -122,7 +108,7 @@ around the accept(2) loop, but re-enstate it otherwise. The desired (and implemented) effect is to give a request as big a chance as possible to succeed and to delay their exits until after their request, while allowing the FastCGI servers waiting for new requests to die right -away. +away. =head1 METHODS