private function createChild($pid, $sockets)
{
fclose($sockets[1]);
$this->pid = (string) $pid;
$this->socket = $sockets[0];
while (($message = @fgets($this->socket)) !== false) {
$ex = null;
try {
$data = json_decode($message, true);
$return = (string) call_user_func_array($data['func'], $data['params']);
} catch (Error $ex) {
} catch (Exception $ex) {
}
if ($ex !== null || @fwrite($this->socket, $return . "\n") === false) {
break;
}
}
fclose($sockets[0]);
exit(0);
}