Conditions | 3 |
Paths | 4 |
Total Lines | 21 |
Code Lines | 11 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | <?php |
||
37 | public function running($id) |
||
38 | { |
||
39 | $switch = "e"; |
||
40 | |||
41 | if (stristr(PHP_OS, "DAR")) { |
||
42 | $switch = "E"; |
||
43 | } |
||
44 | |||
45 | exec("ps {$switch} | grep \"[A]SYNCPHP_PROCESS_ID={$id}\"", $output); |
||
46 | |||
47 | if (count($output)) { |
||
48 | $line = trim($output[0]); |
||
49 | $values = explode(" ", $line); |
||
50 | |||
51 | $this->pid = (int) $values[0]; |
||
52 | |||
53 | return true; |
||
54 | } |
||
55 | |||
56 | return false; |
||
57 | } |
||
58 | |||
71 |