diff --git a/lib/Resque/Worker.php b/lib/Resque/Worker.php index edfe9fc..f51af66 100644 --- a/lib/Resque/Worker.php +++ b/lib/Resque/Worker.php @@ -445,7 +445,7 @@ class Resque_Worker $pids = array(); exec('ps -A -o pid,command | grep [r]esque', $cmdOutput); foreach($cmdOutput as $line) { - list($pids[],) = explode(' ', $line, 2); + list($pids[],) = explode(' ', trim($line), 2); } return $pids; }