Laravoole\Commands\LaravooleCommand::getPid PHP Method

getPid() protected method

protected getPid ( )
    protected function getPid()
    {
        $pid_file = config('laravoole.base_config.pid_file');
        if (file_exists($pid_file)) {
            $pid = file_get_contents($pid_file);
            if (posix_getpgid($pid)) {
                return $pid;
            } else {
                unlink($pid_file);
            }
        }
        return false;
    }