From 5fb34c3a90fb1d68dad3538e7adc06e8c2bfd18c Mon Sep 17 00:00:00 2001 From: KevBurnsJr Date: Mon, 8 Nov 2010 10:48:26 -0800 Subject: [PATCH] Trimming output of `ps -A` to remove prepended whitespace. --- lib/Resque/Worker.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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; }