eee
This commit is contained in:
@@ -24,13 +24,6 @@ trait TraitServer
|
||||
private array $_process = [];
|
||||
|
||||
|
||||
/**
|
||||
* @var StdoutLogger
|
||||
*/
|
||||
#[Container(LoggerInterface::class)]
|
||||
public StdoutLogger $logger;
|
||||
|
||||
|
||||
/**
|
||||
* @param string|array|BaseProcess $class
|
||||
* @return void
|
||||
@@ -64,7 +57,7 @@ trait TraitServer
|
||||
private function genProcess(BaseProcess $name): Process
|
||||
{
|
||||
return new Process(function (Process $process) use ($name) {
|
||||
$process->name('[' . \config('id','system-service') . ']' . $name->getName());
|
||||
$process->name('[' . \config('id','system-service') . '].' . $name->getName());
|
||||
$name->onSigterm()->process($process);
|
||||
},
|
||||
$name->getRedirectStdinAndStdout(),
|
||||
@@ -111,7 +104,7 @@ trait TraitServer
|
||||
public function onSigint($no, array $signInfo): void
|
||||
{
|
||||
try {
|
||||
$this->logger->alert('Pid ' . getmypid() . ' get signo ' . $no);
|
||||
Kiri::getLogger()->alert('Pid ' . getmypid() . ' get signo ' . $no);
|
||||
$this->shutdown();
|
||||
} catch (\Throwable $exception) {
|
||||
error($exception);
|
||||
|
||||
Reference in New Issue
Block a user