diff --git a/kiri-engine/FileListen/FileChangeCustomProcess.php b/kiri-engine/FileListen/FileChangeCustomProcess.php index 9fb35303..3310e81c 100644 --- a/kiri-engine/FileListen/FileChangeCustomProcess.php +++ b/kiri-engine/FileListen/FileChangeCustomProcess.php @@ -104,10 +104,12 @@ class FileChangeCustomProcess extends Command { Kiri::getDi()->get(Logger::class)->warning('change reload'); - $content = file_get_contents(storage('.swoole.pid')); + $content = (int)file_get_contents(storage('.swoole.pid')); if (!empty($content)) { - var_dump($content); - Process::kill((int)$content, SIGTERM); + var_dump($content, Process::kill($content, 0)); + if (Process::kill($content, 0)) { + Process::kill($content, SIGTERM); + } } proc_open("php " . APP_PATH . "kiri.php", [], $pipes); }