Trimming output of ps -A to remove prepended whitespace.

This commit is contained in:
KevBurnsJr 2010-11-08 10:48:26 -08:00
parent cff5d779b4
commit 5fb34c3a90

View File

@ -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;
} }