Re: Fork and zombies
| From: | Waynn Lue | Date: | Tue, 17 Mar 2009 11:15:58 +0000 |
| Subject: | Re: Fork and zombies | ||
| References: | 1 2 3 4 5 6 7 8 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-290160@lists.php.net to get a copy of this message | ||
>
> I think your waitpid() is in the wrong place, and at least you need use
> WNOHANG - unless you specifically want to wait for each child to finish
> before starting another one.
>
> > But it still has the same problem, and I'm also trying to avoid
> > pcntl_wait or pcntl_waitpid at all because I still want to do it
> > asynchronously.
>
> pcntl_wait(WNOHANG) will make everything work asynchronously.
>
Ah, I was changing it to waiting for each child to finish in order to see if
I could narrow down my db problem, because I figure this should be more or
less equivalent to running it synchronously. Even like this, though, it
still causes the db problem.