From a290108ddd8c8bf96903ff5a62b6a75997f3250b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=90=91=E6=9E=97?= Date: Thu, 18 Nov 2021 16:44:55 +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 --- kiri-engine/FileListen/HotReload.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/kiri-engine/FileListen/HotReload.php b/kiri-engine/FileListen/HotReload.php index aee8e444..29cb186f 100644 --- a/kiri-engine/FileListen/HotReload.php +++ b/kiri-engine/FileListen/HotReload.php @@ -117,7 +117,7 @@ class HotReload extends Command Coroutine::create(function () { $pid = file_get_contents(storage('.swoole.pid')); $source = proc_open("php " . APP_PATH . "kiri.php sw:server start", [], $pipes); - if (!empty($pid)) { + if (!empty($pid) && Process::kill($pid, 0)) { Process::kill($pid, SIGTERM); } $this->stop();