From 31fdb9ec7b1ab3350ebe242a0e1720afc285112c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mr=C2=B7x?= Date: Mon, 19 Apr 2021 14:48:06 +0800 Subject: [PATCH] =?UTF-8?q?=E6=94=B9=E5=90=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- HttpServer/Shutdown.php | 5 +++-- System/Process/ServerInotify.php | 2 -- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/HttpServer/Shutdown.php b/HttpServer/Shutdown.php index cf01d194..e70b53e0 100644 --- a/HttpServer/Shutdown.php +++ b/HttpServer/Shutdown.php @@ -47,8 +47,9 @@ class Shutdown extends Component public function shutdown(): void { clearstatcache(storage()); - exec('ls -alh /.dockerenv', $output, $cod); - if ($cod === 0 && !empty($output)) { + $output = shell_exec('ls -alh /.dockerenv'); + var_dump($output); + if (!empty($output)) { return; } diff --git a/System/Process/ServerInotify.php b/System/Process/ServerInotify.php index 6c6bd7d6..38387366 100644 --- a/System/Process/ServerInotify.php +++ b/System/Process/ServerInotify.php @@ -43,8 +43,6 @@ class ServerInotify extends Process { set_error_handler([$this, 'onErrorHandler']); $this->dirs = Config::get('inotify', [APP_PATH]); - - var_dump(extension_loaded('inotify')); if (extension_loaded('inotify')) { $this->inotify = inotify_init(); $this->events = IN_MODIFY | IN_DELETE | IN_CREATE | IN_MOVE;