| Conditions | 1 |
| Paths | 1 |
| Total Lines | 10 |
| Code Lines | 5 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 34 | public function isApplicationProcess($pid): bool |
||
| 35 | { |
||
| 36 | // This is a workaround to avoid the grep processs to be match |
||
| 37 | $grepProofPid = preg_replace('/([\d]+)(\d)$/', '$1[$2]', $pid); |
||
| 38 | $command = sprintf('ps aux | egrep \'%s.*%s( )?\'', $grepProofPid, $this->getApplicationName()); |
||
| 39 | |||
| 40 | exec($command, $output, $result); |
||
| 41 | |||
| 42 | return $result === 0; |
||
| 43 | } |
||
| 44 | } |
||
| 45 |