public function isProcessRunning(bool $throwsException = false): bool
    {
        $running = false;
        try {
            $pid = $this->getPid();
            $isRunning = $this->process->isRunning($pid);
            if ($isRunning) {
                $this->logger->debug("Pid '${pid}' running.");
                $running = true;
            } else {
                $this->logger->debug("Pid '${pid}' not running.");
            }
        } catch (Exception\PidNotFoundException $e) {
            if ($throwsException) {
                throw $e;
            }
        }

        return $running;
    }