]> git.wh0rd.org - tt-rss.git/blobdiff - update_daemon.php
daemon: fallback automatically when pcntl_signal() is not present
[tt-rss.git] / update_daemon.php
old mode 100644 (file)
new mode 100755 (executable)
index b2bae95..03d366b
                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");