On 11 Mar 2001, Raphael Arlitt wrote:

> Hi,
> I need to get modperl scripts get stopped by apache when
> the user hits the Stop button in its browser.
> There is a section at
> 
>http://www.perldoc.com/cpan/Apache/Example.html#Handling%20the%20'User%20pressed%20Stop%20button'%20case
> where exactly this is explained. Hm - they mention the
> following script which does an infinite loop. It does not
> stop in my environment. Where in httpd.conf does the
> PerlFixupHandler Apache::SIG go? Does anybody has a snippet
> from his/hers httpd.conf for me?
>
> httpd/cgi-bin > cat stopping_detector2.pl
>  my $r = shift;
>           $r->send_http_header('text/plain');
>
>           print "PID = $$\n";
>           $r->rflush;
>
>           while(1){
>             $r->print("\0");
>             $r->rflush;
>
>             last if $r->connection->aborted;
>
>             $i++;
>             sleep 1;
>           }

I don't know what version of the guide they store on perldoc.com. I
suppose they convert it automatically from the sources on CPAN, which
explains broken links and incorrectly interpreted tags. You should read
http://perl.apache.org/guide/ instead.

As for your question, you don't need Apache::SIG, when you use

  last if $r->connection->aborted;

However I don't know about Win32, may be Apache works differently there.
It works on Unix.


> Please reply also by email..
>
> Help is appreciated :-)
>
> Here is my installation data:
>
> Apache/1.3.14 (Unix) (SuSE/Linux)
> mod_perl/1.24
>
> By the way - I read at www.perldoc.com that mod_perl is considered alpha at
> win32... I am in the need of setting it up on win2000 with industrial
> strength. Is that feasible?
>
> Raphael
>



_____________________________________________________________________
Stas Bekman              JAm_pH     --   Just Another mod_perl Hacker
http://stason.org/       mod_perl Guide  http://perl.apache.org/guide
mailto:[EMAIL PROTECTED]   http://apachetoday.com http://logilune.com/
http://singlesheaven.com http://perl.apache.org http://perlmonth.com/


Reply via email to