Hi All,

For the project that I am currently working on, I have a number of pages
that need to initiate some lengthy processing that would (ideally) be
carried out in the background while allowing the site user to carry on with
other page views.

A fork() call would be ideal for this purpose.

What are the implications?
I can think of these:

1. The forked child might try and do something strange after PHP has
finished processing the script and returned control to the SAPI.
2. Persistent resources might get screwed.

For (1), PHP could keep a flag so that it knows when it forked and then
call _exit() instead of returning control to the SAPI.

For (2), I'm not sure if/when it would happen.

What else is there to get in the way of this?
If it's been discussed before, just tell me to shut up! ;-)

The other alternative is to run another process that makes an HTTP request
to another php page, but this is a pain because session state and the vars
in the current page are not maintained.

--Wez.


-- 
PHP Development Mailing List <http://www.php.net/>
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

Reply via email to