[prev in list] [next in list] [prev in thread] [next in thread] 

List:       apache-modperl
Subject:    Re: The dreaded "User hit the STOP button" situation
From:       Joshua Chamas <joshua () chamas ! com>
Date:       1999-05-31 18:17:34
[Download RAW message or body]

Whether a perl script continues to run under Apache / modperl seems
more to do with Apache than with anything I can check.  My understanding,
seen in action is that scripts run under apache's less that 1.3.6 just 
quit when user hits STOP.

Doug, is there anyway to stop the STOP killing the script in apache's less 
than 1.3.6.  If there is, I'll turn this behavior on by default under 
Apache::ASP, as it is the most often desired behavior.

I'll look into adding support for $Response->{IsClientConnected}.

--Joshua

Matt Sergeant wrote:
> 
> Joshua Chamas wrote:
> >
> > Same as any other modperl script.  Apache's less than version 1.3.6
> > kill the script immediately upon getting the STOP.
> >
> > You can have code run guaranteed with the $Server->RegisterCleanup(sub {})
> > ASP API extension, which will get run during the register_cleanup phase
> > of mod_perl.  You will have access to $Session & other objects there,
> > which differs from using Apache->register_cleanup(sub {})
> >
> > If a Script_OnEnd() event is defined in the global.asa, it will not
> > be called if the user has STOP'd during script execution.  Script_OnEnd
> > is useful for things like including footers for every ASP script.
> 
> What should really happen according to the ASP spec is that the script
> should continue running until it exits itself. You should be able to
> call $Response->{IsClientConnected} to find out if the user hit stop. I
> actually really need this support because I'm about to port a large ASP
> project to Apache::ASP, and it uses IsClientConnected extensively.
> 
> See the PerlScript guide on my web site for any more info (I don't think
> there's actually much more there). Ignore my comment about "Why IIS
> doesn't kill the script" - I was naive when I wrote it...
> 
> --
> <Matt/>
> 
> Details: FastNet Software Ltd - XML, Perl, Databases.
> Tagline: High Performance Web Solutions
> Web Sites: http://come.to/fastnet http://sergeant.org
> Available for Consultancy, Contracts and Training.

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic