From 3ddec68d7f66cd358f8ad0bbf31b18652f03fdcd Mon Sep 17 00:00:00 2001 From: Administrator Date: Thu, 4 Nov 2021 23:48:53 +0800 Subject: [PATCH] 111 --- kiri-engine/FileListen/FileChangeCustomProcess.php | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/kiri-engine/FileListen/FileChangeCustomProcess.php b/kiri-engine/FileListen/FileChangeCustomProcess.php index 1dae7b15..00892c39 100644 --- a/kiri-engine/FileListen/FileChangeCustomProcess.php +++ b/kiri-engine/FileListen/FileChangeCustomProcess.php @@ -57,7 +57,7 @@ class FileChangeCustomProcess extends Command public function execute(InputInterface $input, OutputInterface $output): int { // TODO: Implement onHandler() method. -// set_error_handler([$this, 'onErrorHandler']); + set_error_handler([$this, 'onErrorHandler']); $this->dirs = Config::get('inotify', [APP_PATH . 'app']); if (!extension_loaded('inotify')) { @@ -67,14 +67,9 @@ class FileChangeCustomProcess extends Command } $make = Barrier::make(); go(function () { - $sign = Coroutine::waitSignal(SIGTERM, -1); - if ($sign) { - proc_close($this->source); - } + $this->trigger_reload(0); }); go(function () use ($driver) { - proc_open('php ' . APP_PATH . 'kiri.php', [], $pipes); - $driver->start(Coroutine::getCid()); }); Barrier::wait($make); @@ -116,4 +111,9 @@ class FileChangeCustomProcess extends Command proc_open("php " . APP_PATH . "kiri.php", [], $pipes); } + + + + + }