Loading ...
Sorry, an error occurred while loading the content.

148Re: use script variables in cleanup code?

Expand Messages
  • Joshua Chamas
    Feb 12, 2002
    • 0 Attachment
      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.

      --Josh

      _________________________________________________________________
      Joshua Chamas Chamas Enterprises Inc.
      NodeWorks Founder Huntington Beach, CA USA
      http://www.nodeworks.com 1-714-625-4051

      ---------------------------------------------------------------------
      To unsubscribe, e-mail: asp-unsubscribe@...
      For additional commands, e-mail: asp-help@...
    • Show all 4 messages in this topic