[nycphp-talk] pcntl_fork() assistance
csnyder
chsnyder at gmail.com
Wed Sep 20 17:32:40 EDT 2006
On 9/20/06, Joseph Crawford <codebowl at gmail.com> wrote:
> Hey guys,
>
> I am trying to use pcntl_fork() on the mac, hoever when i do
>
> $pid = pcntl_fork();
> echo $pid; // nothing returns
> I am guessing that it is returning a blank string but not sure how to debug
> that, i tried var_dump($pid) but i get nothing (not sure if this is due to
> being a command line util or not.
>
> The question is does pcntl_fork work on the mac ??
Yes. It should work on Mac, it's a unix environment.
I assume you've seen this:
" Process Control support in PHP is not enabled by default. You have
to compile the CGI or CLI version of PHP with --enable-pcntl
configuration option when compiling PHP to enable Process Control
support."
Also, remember that in the child process, $pid will be empty.
--
Chris Snyder
http://chxo.com/
More information about the talk
mailing list