This commit is contained in:
2021-11-18 17:05:00 +08:00
parent 82b5650c8a
commit 8456e1b7d5
2 changed files with 3 additions and 7 deletions
+3 -4
View File
@@ -167,12 +167,11 @@ class ServerManager
if (is_string($customProcess)) {
$customProcess = Kiri::getDi()->get($customProcess);
}
$process = new Process([$customProcess, 'process'], $customProcess->getRedirectStdinAndStdout(),
$customProcess->getPipeType(), $customProcess->isEnableCoroutine());
$system = sprintf('[%s].process', Config::get('id', 'system-service'));
if (Kiri::getPlatform()->isLinux()) {
$process = new Process(function (Process $process) use ($customProcess, $system) {
$process->name($system . '(' . $customProcess->getName() . ')');
}
$customProcess->process($process);
}, $customProcess->getRedirectStdinAndStdout(), $customProcess->getPipeType(), $customProcess->isEnableCoroutine());
$this->logger->debug($system . ' ' . $customProcess->getName() . ' start.');
$this->container->setBindings($customProcess->getName(), $process);
$this->server->addProcess($process);