Jochem Maas wrote:
> Per Jessen schreef:
>> Waynn Lue wrote:
>>> (Apologies for topposting, I'm on my blackberry). Hm, so you think
>>> exiting from the child thread causes the db resource to get
>> Yeah, something like that. The connection is definitely closed when
>> the child exits.
> I can confirm this. you definitely need to open a connection for each
> child process. if you require a db connection in the parent process,
> you should close it before forking (and then reopen it afterwards if
> you still need it).
Yep, exactly my thinking.
> at least that's what I found I had to do when I ran into this.
> incidently my forking loop looks like this, very interested to know if
> Per can spot any obvious stupidity:
I doubt it.
I can't quite follow your code after the pcntl_wait where you've got a
pcntl_kill(), but it looks like an insurance policy? "just in case" ?
Per Jessen, Zürich (7.0°C)
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php