diff --git a/kiri-engine/FileListen/FileChangeCustomProcess.php b/kiri-engine/FileListen/FileChangeCustomProcess.php index 37cab657..836b1baf 100644 --- a/kiri-engine/FileListen/FileChangeCustomProcess.php +++ b/kiri-engine/FileListen/FileChangeCustomProcess.php @@ -101,11 +101,8 @@ class FileChangeCustomProcess extends Command Kiri::getDi()->get(Logger::class)->warning('change reload'); $content = (int)file_get_contents(storage('.swoole.pid')); - if (!empty($content)) { - var_dump($content, Process::kill($content, 0)); - if (Process::kill($content, 0)) { - Process::kill($content, SIGTERM); - } + if (!empty($content) && Process::kill($content, 0)) { + Process::kill($content, SIGTERM); } proc_open("php " . APP_PATH . "kiri.php", [], $pipes); }