From 33b55b57f27cbd3a17ad63638fc2985efddfffdd Mon Sep 17 00:00:00 2001 From: "as2252258@163.com" Date: Sun, 28 Mar 2021 17:00:00 +0800 Subject: [PATCH] modify --- HttpServer/Shutdown.php | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/HttpServer/Shutdown.php b/HttpServer/Shutdown.php index c19fcce0..ce333643 100644 --- a/HttpServer/Shutdown.php +++ b/HttpServer/Shutdown.php @@ -37,6 +37,11 @@ class Shutdown extends Component public function shutdown(): void { clearstatcache(storage()); + exec('ls -alh /.dockerenv', $output, $cod); + if ($cod !== 0 && empty($output)) { + return; + } + $master_pid = Server()->setting['pid_file'] ?? PID_PATH; if (file_exists($master_pid)) { $this->close($master_pid);