perl-asp mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Joshua Chamas <>
Subject Re: use script variables in cleanup code?
Date Wed, 13 Feb 2002 01:01:12 GMT
Tim Pushor wrote:
> So does the cleanup handler run regardless of whether the script is aborted
> or not? Is there any (built in) way of determining if the script went to
> completion?

The cleanup handler will always get run, except if the process
exits early, which might be the case of the apache httpd being 
shut down (?) for instance or just killed.  But the cleanup handler
is guaranteed to run each request otherwise.  The Script_OnEnd
will not be run all the time ( say in case of error ), but 
the $Server->RegisterCleanup() handler will.

How would a script get aborted?  Unless you abort a script running
yourself, I believe mod_perl scripts will continue to run whether
or not the client is still connected.  You might do something, 
like in Script_OnEnd like a test for $Response->IsClientConnected
to find out if the client was still connected when the script
ran to completion.


Joshua Chamas                           Chamas Enterprises Inc.
NodeWorks Founder                       Huntington Beach, CA  USA                1-714-625-4051

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message