public function stop($quit = true): int
    {
        if (!$masterPid = $this->getPidFromFile(true)) {
            return Show::error("The swoole server({$this->name}) is not running.");
        }

        // Show::write("The swoole server({$this->name}:{$masterPid}) process stopping ", false);

        ProcessUtil::killAndWait($masterPid, $error = null, $this->name);

        if ($error) {
            return Show::error($error);
        }

        ServerUtil::removePidFile($this->pidFile);

        // stop success
        return Show::write("The swoole server({$this->name}) process stop success", $quit);
    }