you should use following code to prevent situation described by anxious2006 (children exit near simultaneously)
public function sig_handler($signo){
switch ($signo) {
case SIGCLD:
while( ( $pid = pcntl_wait ( $signo, WNOHANG ) ) > 0 ){
$signal = pcntl_wexitstatus ( $signo );
}
break;
}
}