1 | <?php |
||
10 | class Process |
||
11 | { |
||
12 | /** |
||
13 | * @var int |
||
14 | */ |
||
15 | protected $processID; |
||
16 | |||
17 | |||
18 | |||
19 | public function __construct(int $processID) |
||
32 | |||
33 | |||
34 | |||
35 | public function getProcessID() : int |
||
39 | |||
40 | |||
41 | |||
42 | /** |
||
43 | * Determine if this process is currently running. Defunct/zombie processes |
||
44 | * are ignored. |
||
45 | */ |
||
46 | public function isRunning() : bool |
||
59 | |||
60 | |||
61 | |||
62 | /** |
||
63 | * Wait for the process to finish. |
||
64 | */ |
||
65 | public function wait() |
||
72 | |||
73 | |||
74 | |||
75 | /** |
||
76 | * Terminate the process. |
||
77 | */ |
||
78 | public function terminate() : bool |
||
85 | |||
86 | /** |
||
87 | * Kill the process. |
||
88 | */ |
||
89 | public function kill() : bool |
||
96 | } |
||
97 |