mirror of
https://git.tt-rss.org/git/tt-rss.git
synced 2025-12-13 16:25:56 +00:00
add make_lockfile()
This commit is contained in:
@@ -928,4 +928,14 @@
|
||||
}
|
||||
}
|
||||
|
||||
function make_lockfile($filename) {
|
||||
$fp = fopen($filename, "w");
|
||||
|
||||
if (flock($fp, LOCK_EX | LOCK_NB)) {
|
||||
return $fp;
|
||||
} else {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
?>
|
||||
|
||||
Reference in New Issue
Block a user