Pcntl question

Do you have a question? Post it now! No Registration Necessary.  Now with pictures!

I have a set of code that looks something like:

This is more psuedo code but you can get the idea

function doget($doexec)


if ($doexec)
// the same code in getstuff.php
$i = new getstuff();
mysql PEAR procedures to store data

$CHILD_PID = pcntl_fork();

if($CHILD_PID == 0)

If I do this with doget (TRUE) then everything works but if I do this
doget(FALSE) then mysql loses the connection. I reinstantiate my db
class for every new child, is this common or am I approaching this

Does this have something to do with the Zend optmizer? I am running php
5.0.3 with mysql 4.1.x on Freebsd 5.1

Site Timeline