summaryrefslogtreecommitdiff
path: root/update_daemon.php
diff options
context:
space:
mode:
authorAndrew Dolgov <[email protected]>2010-03-22 11:17:58 +0300
committerAndrew Dolgov <[email protected]>2010-03-22 11:17:58 +0300
commit16956646460aef1d8e0c41b261ce56af88e2f4f6 (patch)
treec0d68527466136159cb3eaedea903b5f45a79df3 /update_daemon.php
parent36d146f8e234bf0b74f3d937fa4e1b47b9b58935 (diff)
daemon: fallback automatically when pcntl_signal() is not present
Diffstat (limited to 'update_daemon.php')
-rwxr-xr-xupdate_daemon.php8
1 files changed, 6 insertions, 2 deletions
diff --git a/update_daemon.php b/update_daemon.php
index b2bae956e..03d366b5e 100755
--- a/update_daemon.php
+++ b/update_daemon.php
@@ -44,8 +44,12 @@
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");