mirror of
https://github.com/hybula/lookingglass.git
synced 2024-09-21 05:20:06 +00:00
Fix for Debian in Docker.
This commit is contained in:
parent
956ae30bde
commit
3bcecef5df
|
@ -311,16 +311,18 @@ class LookingGlass
|
||||||
foreach ($pipes as $pipe) {
|
foreach ($pipes as $pipe) {
|
||||||
fclose($pipe);
|
fclose($pipe);
|
||||||
}
|
}
|
||||||
|
if ($status['pid']) {
|
||||||
// retrieve parent pid
|
// retrieve parent pid
|
||||||
$ppid = $status['pid'];
|
//$ppid = $status['pid'];
|
||||||
// use ps to get all the children of this process
|
// use ps to get all the children of this process
|
||||||
$pids = preg_split('/\s+/', `ps -o pid --no-heading --ppid $ppid`);
|
$pids = preg_split('/\s+/', 'ps -o pid --no-heading --ppid '.$status['pid']);
|
||||||
// kill remaining processes
|
// kill remaining processes
|
||||||
foreach($pids as $pid) {
|
foreach ($pids as $pid) {
|
||||||
if (is_numeric($pid)) {
|
if (is_numeric($pid)) {
|
||||||
posix_kill($pid, 9);
|
posix_kill($pid, 9);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
proc_close($process);
|
proc_close($process);
|
||||||
}
|
}
|
||||||
return true;
|
return true;
|
||||||
|
|
Loading…
Reference in a new issue