From ed3662172d2c06f10d40745354928d943ff6eb7c Mon Sep 17 00:00:00 2001 From: Aaron Piotrowski Date: Wed, 14 Mar 2018 18:51:03 -0500 Subject: [PATCH] Added signal() and getPid() methods to Process --- lib/Context/Process.php | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) diff --git a/lib/Context/Process.php b/lib/Context/Process.php index ea620b2..c74d566 100644 --- a/lib/Context/Process.php +++ b/lib/Context/Process.php @@ -232,6 +232,32 @@ class Process implements Context { }); } + /** + * Send a signal to the process. + * + * @see \Amp\Process\Process::signal() + * + * @param int $signo + * + * @throws \Amp\Process\ProcessException + * @throws \Amp\Process\StatusError + */ + public function signal(int $signo) { + $this->process->signal($signo); + } + + /** + * Returns a promise resolving to the process PID. + * + * @see \Amp\Process\Process::getPid() + * + * @return \Amp\Promise + * @throws \Amp\Process\StatusError + */ + public function getPid(): Promise { + return $this->process->getPid(); + } + /** * {@inheritdoc} */