On Tue, 30 Jul 2002, Steve Keith - Baselines wrote:

> Hello -
>
> I believe that when a person presses the STOP button, or exits a browser
> session in any way, the running process is killed.  If a script is being run
> that generates that web page, then it will abort somewhere in the middle.
>
> I also believe that by using SIG and/or eval, I could have the program clean
> up before exiting.  I'd rather stay away from this if I could.
>
> Is there any other way to force a script to complete even if the browser
> 'STOP' button is pressed, or also if the browser is exited?
>
> If anyone has examples of their experiences/solutions to share, paticularly
> that involve MLDBM/DB_File database commits via web pages, I'd be greatful
> (or is that grateful?)
>

One general way would be to have the actions logically detached from the
process assoicated with the browser. There are a number of different
ways to accomplish this. One way would be to initiate an independent
process to carry out the action, e.g. with a fork or a CreateProcess
type of approach. Another way is to enter an "action request" into
a "queue" and have an independently running process periodically
check the queue for work to do and do it. The nature of the queue
mechanism could vary all the way from a file that was created in
a directory by the browser and deleted by the separate process to
an entry stored in a database and deleted by the independent process
when performed. Which mechanism was selected would depend on information
you haven't provided.

**** [EMAIL PROTECTED] <Carl Jolley>
**** All opinions are my own and not necessarily those of my employer ****

_______________________________________________
Perl-Win32-Users mailing list
[EMAIL PROTECTED]
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs

Reply via email to