add make_lockfile()

This commit is contained in:
Andrew Dolgov 2006-02-12 08:21:52 +01:00
parent 6eafcac62f
commit fcb4c0c93b

View file

@ -928,4 +928,14 @@
}
}
function make_lockfile($filename) {
$fp = fopen($filename, "w");
if (flock($fp, LOCK_EX | LOCK_NB)) {
return $fp;
} else {
return false;
}
}
?>