From: Andrew Dolgov Date: Mon, 13 Feb 2006 13:08:23 +0000 (+0100) Subject: warn if daemon process is not running on server X-Git-Tag: 1.1.3~14 X-Git-Url: https://git.wh0rd.org/?a=commitdiff_plain;h=27981ca30f85655ca487257418b19a17f962b0c3;p=tt-rss.git warn if daemon process is not running on server --- diff --git a/functions.php b/functions.php index 55e78548..f813b6ba 100644 --- a/functions.php +++ b/functions.php @@ -928,6 +928,22 @@ } } + function file_is_locked($filename) { + error_reporting(0); + $fp = fopen($filename, "r"); + error_reporting(DEFAULT_ERROR_LEVEL); + if ($fp) { + if (flock($fp, LOCK_EX | LOCK_NB)) { + flock($fp, LOCK_UN); + fclose($fp); + return false; + } + fclose($fp); + return true; + } + return false; + } + function make_lockfile($filename) { $fp = fopen($filename, "w"); diff --git a/tt-rss.php b/tt-rss.php index 1245be27..37eed61a 100644 --- a/tt-rss.php +++ b/tt-rss.php @@ -50,6 +50,14 @@ + +
+ Warning: Update daemon is enabled in configuration, but daemon + process is not running, which prevents all feeds from updating. Please + start the daemon process or contact instance owner. +
+ +