Re: Re: Fork and zombies
| From: | Per Jessen | Date: | Wed, 18 Mar 2009 07:36:30 +0000 |
| Subject: | Re: Re: Fork and zombies | ||
| References: | 1 2 3 4 5 6 7 8 9 10 11 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-290205@lists.php.net to get a copy of this message | ||
Waynn Lue wrote:
> Whoops, I spoke too soon, I think the sleep(3) causes the child not to
> exit before the parent. If instead I don't pass WNOHANG to the
> waitpid command, it does error out. So it looks like your theory is
> correct, and I still have that problem. I guess the only solution is
> to rewrite the functions to use a new db connection every time?
Each child should open its own database connection (if it needs one),
and the parent should not keep the connection open at time of fork().
/Per
--
Per Jessen, Zürich (4.6°C)