This commit is contained in:
2021-11-18 15:59:46 +08:00
parent 370b255862
commit e872e04da1
+2 -7
View File
@@ -167,13 +167,8 @@ class ServerManager
if (is_string($customProcess)) { if (is_string($customProcess)) {
$customProcess = Kiri::getDi()->get($customProcess); $customProcess = Kiri::getDi()->get($customProcess);
} }
$process = new Process(function (Process $soloProcess) use ($customProcess) { $process = new Process([$customProcess, 'process'], $customProcess->getRedirectStdinAndStdout(),
$customProcess->onProcessExec($soloProcess); $customProcess->getPipeType(), $customProcess->isEnableCoroutine());
},
$customProcess->getRedirectStdinAndStdout(),
$customProcess->getPipeType(),
$customProcess->isEnableCoroutine()
);
$system = sprintf('[%s].process', Config::get('id', 'system-service')); $system = sprintf('[%s].process', Config::get('id', 'system-service'));
if (Kiri::getPlatform()->isLinux()) { if (Kiri::getPlatform()->isLinux()) {
$process->name($system . '(' . $customProcess->getName() . ')'); $process->name($system . '(' . $customProcess->getName() . ')');