1
0
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:
Bob Weinand 2015-09-11 00:59:23 +02:00
parent e7a1d052fb
commit 6addcdddee

View File

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