On Sun, 27 Jun 2004 15:31:59 -0500 (CDT), [EMAIL PROTECTED]
<[EMAIL PROTECTED]> wrote:
> 
> Is it possible to pcntl_fork() withing a class?
> 
> Basically I want a web page to load, and when the class is called in the
> page, it can fork and the child can run, allowing the webpage to finish,
> but the class process can continue 'till it's done.
> 
> Is this possible? Would I put the fork in the constructor? Would calling
> the class methods after it forked work the same way?

When you fork, you get two exact copies of the same process with only
one difference. The value returned from pcntl_fork(). As for the child
processes finishing in the background....I'm not sure. The entire
process may not be able to finish unless the child is finished OR the
child may just exit when the parent does (when the user clicks stop)
OR the web browser may look like it's still loading but the main page
will be done. I would suggest doing a test.

-- 
paperCrane --Justin Patrin--

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to