public static function fork($id = 0, callable $childHandler = null)
    {
        $info = [];
        $pid = pcntl_fork();

        if ($pid > 0) {// at parent, get forked child info
            $info = [
                'id' => $id,
                'pid' => $pid,
                'startTime' => time(),
            ];
        } elseif ($pid === 0) { // at child
            $pid = getmypid();

            if ($childHandler) {
                $childHandler($id, $pid);
            }

        } else {
            Cli::stderr("Fork child process failed! exiting.\n");
        }

        return $info;
    }