mirror of
https://github.com/danog/process.git
synced 2025-01-22 22:01:22 +01:00
Add getter for pid
This commit is contained in:
parent
e7a1d052fb
commit
6addcdddee
@ -138,6 +138,14 @@ class Process {
|
||||
$this->writeDeferreds = [];
|
||||
}
|
||||
|
||||
public function pid() {
|
||||
if (!$this->proc) {
|
||||
return;
|
||||
}
|
||||
|
||||
return \proc_get_status($this->proc)["pid"];
|
||||
}
|
||||
|
||||
/**
|
||||
* @return Promise which will succeed after $str was written. It will contain the total number of already written bytes to the process
|
||||
*/
|
||||
|
Loading…
x
Reference in New Issue
Block a user