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:
parent
dbdc7895ac
commit
ed3662172d
@ -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}
|
||||
*/
|
||||
|
Loading…
Reference in New Issue
Block a user