From c6279d6214f23bd0d36c3aea4df19df37a2cbf9a Mon Sep 17 00:00:00 2001 From: Administrator Date: Fri, 5 Nov 2021 01:05:01 +0800 Subject: [PATCH] 111 --- kiri-engine/FileListen/FileChangeCustomProcess.php | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/kiri-engine/FileListen/FileChangeCustomProcess.php b/kiri-engine/FileListen/FileChangeCustomProcess.php index f576d99e..5b77a628 100644 --- a/kiri-engine/FileListen/FileChangeCustomProcess.php +++ b/kiri-engine/FileListen/FileChangeCustomProcess.php @@ -14,6 +14,7 @@ use Symfony\Component\Console\Command\Command; use Symfony\Component\Console\Input\InputArgument; use Symfony\Component\Console\Input\InputInterface; use Symfony\Component\Console\Output\OutputInterface; +use function Co\run; /** @@ -66,7 +67,9 @@ class FileChangeCustomProcess extends Command } else { $driver = Kiri::getDi()->get(Inotify::class, [$this->dirs, $this]); } - $driver->start(); + run(function () use ($driver) { + $driver->start(); + }); return 0; }