Skip to content

Commit 954d093

Browse files
the best: Resque::fork already tests for ability to fork, so use that instead
1 parent a84812f commit 954d093

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/Resque/Worker.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -187,7 +187,7 @@ public function work($interval = 5)
187187
$this->child = Resque::fork();
188188

189189
// Forked and we're the child. Or PCNTL is not installed. Run the job.
190-
if ($this->child === 0 || $this->child === false || !function_exists('pcntl_fork')) {
190+
if ($this->child === 0 || $this->child === false || $this->child === -1) {
191191
$status = 'Processing ' . $job->queue . ' since ' . strftime('%F %T');
192192
$this->updateProcLine($status);
193193
$this->log($status, self::LOG_VERBOSE);

0 commit comments

Comments
 (0)