From 483c898f517085628f020f7003d372d24a8dcffa Mon Sep 17 00:00:00 2001 From: Administrator Date: Mon, 10 Jan 2022 02:13:11 +0800 Subject: [PATCH] 1 --- kiri-engine/FileListen/HotReload.php | 12 +----------- 1 file changed, 1 insertion(+), 11 deletions(-) diff --git a/kiri-engine/FileListen/HotReload.php b/kiri-engine/FileListen/HotReload.php index 395af79e..45516f2b 100644 --- a/kiri-engine/FileListen/HotReload.php +++ b/kiri-engine/FileListen/HotReload.php @@ -176,7 +176,6 @@ class HotReload extends Command Timer::clearAll(); $this->driver->clear(); $this->stopServer(); - $this->stopManager(); while ($ret = Process::wait(TRUE)) { echo "PID={$ret['pid']}\n"; sleep(1); @@ -193,20 +192,13 @@ class HotReload extends Command if (!empty($pid) && Process::kill($pid, 0)) { Process::kill($pid, SIGTERM); } - } - - - /** - * - */ - protected function stopManager() - { if ($this->process && Process::kill($this->process->pid, 0)) { Process::kill($this->process->pid) && Process::wait(TRUE); } } + /** * 重启 * @@ -221,8 +213,6 @@ class HotReload extends Command $this->logger->warning('change reload'); $this->stopServer(); - $this->stopManager(); - $this->process = new Process(function (Process $process) { $process->exec(PHP_BINARY, [APP_PATH . "kiri.php", "sw:server", "start"]); });