1
0
mirror of https://github.com/danog/parallel.git synced 2024-11-30 04:39:01 +01:00

Added signal() and getPid() methods to Process

This commit is contained in:
Aaron Piotrowski 2018-03-14 18:51:03 -05:00
parent dbdc7895ac
commit ed3662172d
No known key found for this signature in database
GPG Key ID: ADD1EF783EDE9EEB

View File

@ -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}
*/