From 4f539f4e78deaf449e228fc2d9a4a7f12f679410 Mon Sep 17 00:00:00 2001 From: Administrator Date: Thu, 4 Nov 2021 23:50:26 +0800 Subject: [PATCH] 111 --- kiri-engine/FileListen/FileChangeCustomProcess.php | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) 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); }