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; + } + } + ?>