diff --git a/lib/Resque/Worker.php b/lib/Resque/Worker.php index 3add46e..946a215 100644 --- a/lib/Resque/Worker.php +++ b/lib/Resque/Worker.php @@ -427,7 +427,7 @@ public function killChild() } $this->logger->log(Psr\Log\LogLevel::INFO, 'Killing child at {child}', array('child' => $this->child)); - if(exec('ps -o pid,state -p ' . $this->child, $output, $returnCode) && $returnCode != 1) { + if(exec('ps -o pid,s -p ' . $this->child, $output, $returnCode) && $returnCode != 1) { $this->logger->log(Psr\Log\LogLevel::DEBUG, 'Child {child} found, killing.', array('child' => $this->child)); posix_kill($this->child, SIGKILL); $this->child = null; @@ -471,7 +471,7 @@ public function pruneDeadWorkers() public function workerPids() { $pids = array(); - exec('ps -A -o pid,command | grep [r]esque', $cmdOutput); + exec('ps -A -o pid,args | grep [r]esque', $cmdOutput); foreach($cmdOutput as $line) { list($pids[],) = explode(' ', trim($line), 2); }