diff --git a/lib/Context/Process.php b/lib/Context/Process.php index 64feba9..800a01b 100644 --- a/lib/Context/Process.php +++ b/lib/Context/Process.php @@ -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);