die("received SIGALRM, hang in feed update?\n");
}
- pcntl_signal(SIGINT, sigint_handler);
- pcntl_signal(SIGALRM, sigalrm_handler);
+ if (function_exists('pcntl_signal')) {
+ pcntl_signal(SIGINT, sigint_handler);
+ pcntl_signal(SIGALRM, sigalrm_handler);
+ } else {
+ _debug("Warning: pcntl_signal function not present, continuing without support for signals.");
+ }
$lock_handle = make_lockfile("update_daemon.lock");
define('SPAWN_INTERVAL', DAEMON_SLEEP_INTERVAL);
+ if (!function_exists('pcntl_fork')) {
+ die("error: This script requires PHP compiled with PCNTL module.\n");
+ }
+
if (!ENABLE_UPDATE_DAEMON) {
- die("Please enable option ENABLE_UPDATE_DAEMON in config.php\n");
+ die("error: Please enable option ENABLE_UPDATE_DAEMON in config.php\n");
}
require_once "db.php";