1 | <?php |
||
10 | class LinuxProcess implements ProcessInterface |
||
11 | { |
||
12 | |||
13 | |||
14 | /** |
||
15 | * @var LoggerInterface |
||
16 | */ |
||
17 | protected $logger; |
||
18 | |||
19 | |||
20 | /** |
||
21 | * LinuxProcess constructor. |
||
22 | * @param LoggerInterface $logger |
||
23 | */ |
||
24 | 27 | public function __construct($logger = null) |
|
31 | |||
32 | /** |
||
33 | * Check whether a pid is running |
||
34 | * |
||
35 | * @throws Exception\InvalidArgumentException |
||
36 | * @param int $pid |
||
37 | * @return boolean |
||
38 | */ |
||
39 | 18 | public function isRunning($pid) |
|
47 | |||
48 | /** |
||
49 | * Kill a process |
||
50 | * |
||
51 | * @throws Exception\InvalidArgumentException |
||
52 | * @param int $pid |
||
53 | * @param bool $wait wait for the process to be killed |
||
54 | * @return bool |
||
55 | */ |
||
56 | 15 | public function kill($pid, $wait = false) |
|
78 | } |
||
79 |