mirror of
https://git.tt-rss.org/git/tt-rss.git
synced 2025-12-20 08:11:28 +00:00
warn if daemon process is not running on server
This commit is contained in:
@@ -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");
|
||||
|
||||
|
||||
Reference in New Issue
Block a user