mirror of
https://github.com/idanoo/php-resque.git
synced 2024-11-22 00:11:53 +00:00
return false if the fork function is unavailable
This commit is contained in:
parent
08de86a41e
commit
4dbdda6aa2
@ -72,12 +72,12 @@ class Resque
|
||||
*
|
||||
* Will close connection to Redis before forking.
|
||||
*
|
||||
* @return int Return vars as per pcntl_fork()
|
||||
* @return int Return vars as per pcntl_fork(). False if pcntl_fork is unavailable
|
||||
*/
|
||||
public static function fork()
|
||||
{
|
||||
if(!function_exists('pcntl_fork')) {
|
||||
return -1;
|
||||
return false;
|
||||
}
|
||||
|
||||
// Close the connection to Redis before forking.
|
||||
@ -377,4 +377,3 @@ class Resque
|
||||
return md5(uniqid('', true));
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user