Why doesnt parent proccess wait for child to execute?
I have the most basic script:

    $pid = pcntl_fork();
    if ($pid == -1) {
         die('could not fork');
    } else if ($pid) {
         // we are the parent
    	 echo "parent done";
         pcntl_wait($status); //Protect against Zombie children
    	 echo "all done";
    } else {
         // we are the child
    	 echo "Child finished";
    }

When I run this, the output is always "Child finished". Im running this on a lighttpd server. 

Why doesnt parent proccess wait for child to execute?
===

I have the most basic script:

    $pid = pcntl_fork();
    if ($pid == -1) {
         die('could not fork');
    } else if ($pid) {
         // we are the parent
    	 echo "parent done";
         pcntl_wait($status); //Protect against Zombie children
    	 echo "all done";
    } else {
         // we are the child
    	 echo "Child finished";
    }

When I run this, the output is always "Child finished". Im running this on a lighttpd server. 
