From 57be0851662608fae0cfbf52dd706130d2ddddff Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=90=91=E6=9E=97?= Date: Thu, 18 Nov 2021 18:41:37 +0800 Subject: [PATCH] =?UTF-8?q?=E6=94=B9=E5=90=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- function.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/function.php b/function.php index 0e05d499..1133c01d 100644 --- a/function.php +++ b/function.php @@ -72,7 +72,7 @@ if (!function_exists('checkPortIsAlready')) { $serverPid = file_get_contents(storage('.swoole.pid')); if (!empty($serverPid) && shell_exec('ps -ef | grep ' . $serverPid . ' | grep -v grep')) { - Process::kill($serverPid, SIGTERM); + Process::kill($serverPid, 0) && Process::kill($serverPid, SIGTERM); } exec('netstat -lnp | grep ' . $port . ' | grep "LISTEN" | awk \'{print $7}\'', $output);