The reason I need to run it in the background and just display the message is that the person that's going to be running this program wants to be able to close the window. The process running in the background can take up to 10 minutes and he's afraid that he may accidentally close the window while it's running and thus will have to start the process again. So, the reason for the fork isn't for the message to be displayed, it's so that it starts the system call in the background so we don't have to sit through it.

On Nov 21, 2003, at 11:08 PM, Robert Brown wrote:

If the only real purpose for the fork is so that the message can be
displayed, why don't you just display the message in a form, and then
go do the long operation single threaded.  When the long operation
finishes, continue to output to the same page and use some javascript
to change the contents of the form field where it says please wait.

I wrote a web based chat over a year ago that makes use of the fact
that if you specify a large value in the file size header, the browser
will stay connected for quite a while.  I can output posted messages
to the browser and it will display them as they come.  It will just
patiently wait there with its busy indicator showing, but it works
fine.  If you experience timeout problems, just output a blank space
character every 3 seconds or so.  This will not change anything, as
the text is being set via html rendering, sso spaces don't count.

If, on the other hand, you really need to fork a background task, you
may be thwarted by the apache perl cgi module that keeps the perl
interpreter in apache instead of forking a new perl for every cgi
script.  I do not know if you can fork a background task with
perl-cgi-mod or not.



--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Reply via email to