Re: Fork() in php?
| From: | Wez Furlong | Date: | Sat, 12 May 2001 01:05:36 +0000 |
| Subject: | Re: Fork() in php? | ||
| References: | 1 | Groups: | php.dev |
| Request: | Send a blank email to php-dev+get-54936@lists.php.net to get a copy of this message | ||
On 2001-05-11 16:10:00, "Jason Greene" <jason@inetgurus.net> wrote:
> What do you guys think about having fork, waitpid, and signal handling
available in php?
> I wrote a few simple fork test functions, and everything seemed to work
fine.
>
> I am thinking that with sockets, shm, signals, and fork capability,
there
could
> be the possibility of someone writing daemons in php : )
I would like to use this functionality to fork an apache request so that
the parent can serve up some content while the child carries on with some
number-crunching or other time consuming task.
I know that there might be some bad interactions with apache if you fork,
but if you allow PHP to spot that it forked and call _exit() instead of
returning into the SAPI, you should be OK?
--Wez.