diff options
Diffstat (limited to 'functions.php')
-rw-r--r-- | functions.php | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/functions.php b/functions.php index d502d08d4..55e785488 100644 --- a/functions.php +++ b/functions.php @@ -928,4 +928,14 @@ } } + function make_lockfile($filename) { + $fp = fopen($filename, "w"); + + if (flock($fp, LOCK_EX | LOCK_NB)) { + return $fp; + } else { + return false; + } + } + ?> |