From 28c139fa50d9a8fd0464df3f0869e7079188f7bb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=90=91=E6=9E=97?= Date: Wed, 19 Apr 2023 14:47:52 +0800 Subject: [PATCH] =?UTF-8?q?=E5=8F=98=E6=9B=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ServerCommand.php | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/ServerCommand.php b/ServerCommand.php index 886539b..047f3b6 100644 --- a/ServerCommand.php +++ b/ServerCommand.php @@ -63,7 +63,9 @@ class ServerCommand extends Command default => throw new Exception('I don\'t know what I want to do.') }; - file_put_contents(storage('.swoole.pid'), 0); + if ($input->getOption('daemon') != 1) { + file_put_contents(storage('.swoole.pid'), 0); + } return $value; } @@ -85,7 +87,6 @@ class ServerCommand extends Command /** * @return int - * @throws ConfigException * @throws ContainerExceptionInterface * @throws NotFoundExceptionInterface */