1
0
mirror of https://git.tt-rss.org/git/tt-rss.git synced 2026-02-10 16:01:33 +00:00

lock checking in update_feeds.php

This commit is contained in:
Andrew Dolgov
2007-09-25 04:23:29 +01:00
parent 0d826d0279
commit 31a6d42de4
2 changed files with 21 additions and 10 deletions

View File

@@ -12,7 +12,15 @@
require_once "db.php";
require_once "db-prefs.php";
require_once "functions.php";
require_once "magpierss/rss_fetch.inc";
$lock_filename = "update_feeds.lock";
$lock_handle = make_lockfile($lock_filename);
if (!$lock_handle) {
die("error: Can't create lockfile ($lock_filename). ".
"Maybe another process is already running.\n");
}
$link = db_connect(DB_HOST, DB_USER, DB_PASS, DB_NAME);
@@ -46,4 +54,5 @@
db_close($link);
unlink($lock_filename);
?>