mirror of
https://github.com/danog/parallel.git
synced 2024-11-26 20:34:40 +01:00
Return PID from Process::start()
This commit is contained in:
parent
c774d2ded1
commit
596f41886b
@ -190,6 +190,8 @@ final class Process implements Context
|
||||
yield $this->process->getStdin()->write($this->hub->generateKey($pid, self::KEY_LENGTH));
|
||||
|
||||
$this->channel = yield $this->hub->accept($pid);
|
||||
|
||||
return $pid;
|
||||
} catch (\Throwable $exception) {
|
||||
$this->process->kill();
|
||||
throw new ContextException("Staring the process failed", 0, $exception);
|
||||
|
Loading…
Reference in New Issue
Block a user