Property | Type | Description | |
---|---|---|---|
$_current |
Method | Description | |
---|---|---|
current ( ) : |
||
fork ( Comos\Qpm\Process\Runnable | Callable $target ) : Comos\Qpm\Process\ChildProcess | ||
getCurrentPid ( ) : integer | ||
getParent ( ) : |
||
getPid ( ) : integer | ||
isCurrent ( ) : boolean | ||
kill ( ) | ||
process ( $pid ) : |
factory method, to produce an instance of Process | |
sendSignal ( $sig ) | ||
terminate ( ) | ||
toBackground ( ) | let current process run in the background |
Method | Description | |
---|---|---|
__construct ( $pid, null $parentProcessId = null ) |
protected __construct ( $pid, null $parentProcessId = null ) | ||
$pid | ||
$parentProcessId | null |
public static fork ( Comos\Qpm\Process\Runnable | Callable $target ) : Comos\Qpm\Process\ChildProcess | ||
$target | Comos\Qpm\Process\Runnable | Callable | |
return | Comos\Qpm\Process\ChildProcess |
public getParent ( ) : |
||
return | returns null on failure It cannot be realtime in some cases. e.g. $child = Process::current()->folkByCallable($fun); echo $child->getParent()->getPid(); If child process changed the parent, you would get the old parent ID. |
public static process ( $pid ) : |
||
$pid | ||
return |
public static toBackground ( ) |