Skip to content

Commit 415eb00

Browse files
committed
Apply old PR 293
Closes chrisboulton/php-resque#293
1 parent 23e641d commit 415eb00

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

lib/Resque/Worker.php

+2-2
Original file line numberDiff line numberDiff line change
@@ -427,7 +427,7 @@ public function killChild()
427427
}
428428

429429
$this->logger->log(Psr\Log\LogLevel::INFO, 'Killing child at {child}', array('child' => $this->child));
430-
if(exec('ps -o pid,state -p ' . $this->child, $output, $returnCode) && $returnCode != 1) {
430+
if(exec('ps -o pid,s -p ' . $this->child, $output, $returnCode) && $returnCode != 1) {
431431
$this->logger->log(Psr\Log\LogLevel::DEBUG, 'Child {child} found, killing.', array('child' => $this->child));
432432
posix_kill($this->child, SIGKILL);
433433
$this->child = null;
@@ -471,7 +471,7 @@ public function pruneDeadWorkers()
471471
public function workerPids()
472472
{
473473
$pids = array();
474-
exec('ps -A -o pid,command | grep [r]esque', $cmdOutput);
474+
exec('ps -A -o pid,args | grep [r]esque', $cmdOutput);
475475
foreach($cmdOutput as $line) {
476476
list($pids[],) = explode(' ', trim($line), 2);
477477
}

0 commit comments

Comments
 (0)