mirror of
https://github.com/idanoo/php-resque.git
synced 2024-11-24 17:25:13 +00:00
Trimming output of ps -A
to remove prepended whitespace.
This commit is contained in:
parent
cff5d779b4
commit
5fb34c3a90
@ -445,7 +445,7 @@ class Resque_Worker
|
|||||||
$pids = array();
|
$pids = array();
|
||||||
exec('ps -A -o pid,command | grep [r]esque', $cmdOutput);
|
exec('ps -A -o pid,command | grep [r]esque', $cmdOutput);
|
||||||
foreach($cmdOutput as $line) {
|
foreach($cmdOutput as $line) {
|
||||||
list($pids[],) = explode(' ', $line, 2);
|
list($pids[],) = explode(' ', trim($line), 2);
|
||||||
}
|
}
|
||||||
return $pids;
|
return $pids;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user