From a44b7a31efbf307d2c79e946231a41207bea22c3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=90=91=E6=9E=97?= Date: Fri, 19 Nov 2021 11:19:46 +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 | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/kiri-engine/FileListen/HotReload.php b/kiri-engine/FileListen/HotReload.php index 70a4145a..7444efe8 100644 --- a/kiri-engine/FileListen/HotReload.php +++ b/kiri-engine/FileListen/HotReload.php @@ -104,8 +104,8 @@ class HotReload extends Command if (!empty($pid) && Process::kill($pid, 0)) { Process::kill($pid, SIGTERM); } - if ($this->process instanceof Process) { - $this->process->exit(); + if ($this->process && Process::kill($this->process->pid,0)) { + Process::kill($this->process->pid) && Process::wait(true); } while ($ret = Process::wait(true)) { echo "PID={$ret['pid']}\n";