From 359a8817a45ba5a7df5f05dc4f23c246371620f4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mr=C2=B7x?= Date: Tue, 8 Sep 2020 11:20:41 +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 --- HttpServer/Action.php | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/HttpServer/Action.php b/HttpServer/Action.php index e55abe6e..466a8153 100644 --- a/HttpServer/Action.php +++ b/HttpServer/Action.php @@ -56,7 +56,10 @@ trait Action if (empty($pathId)) { $this->close($server); } else { - exec("kill -TERM $pathId"); + exec('ps -ef 15132 | grep 15132', $output); + if (!empty($output)) { + exec("kill -TERM $pathId"); + } $this->close($server); } }