mirror of
https://github.com/idanoo/php-resque
synced 2025-06-30 21:22:20 +00:00
abort bin/resque when managing multiple workers and pcntl_fork is unavailable
This commit is contained in:
parent
4dbdda6aa2
commit
eba6ef55e7
1 changed files with 1 additions and 1 deletions
|
@ -96,7 +96,7 @@ if(!empty($PREFIX)) {
|
||||||
if($count > 1) {
|
if($count > 1) {
|
||||||
for($i = 0; $i < $count; ++$i) {
|
for($i = 0; $i < $count; ++$i) {
|
||||||
$pid = Resque::fork();
|
$pid = Resque::fork();
|
||||||
if($pid == -1) {
|
if($pid === false || pid === -1) {
|
||||||
$logger->log(Psr\Log\LogLevel::EMERGENCY, 'Could not fork worker {count}', array('count' => $i));
|
$logger->log(Psr\Log\LogLevel::EMERGENCY, 'Could not fork worker {count}', array('count' => $i));
|
||||||
die();
|
die();
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue