diff options
author | Andrew Dolgov <[email protected]> | 2013-02-25 21:28:51 +0400 |
---|---|---|
committer | Andrew Dolgov <[email protected]> | 2013-02-25 21:28:51 +0400 |
commit | a44bfcfd529439c2ac05d0f300fd241b54a24af3 (patch) | |
tree | 5aaf85bc48a4aac613eb90848ce83b740796ed2c /include/functions.php | |
parent | 1a43a68cb107205d43fee40a1d71cc998d6abc74 (diff) |
make_lockfile: check if file was created successfully
Diffstat (limited to 'include/functions.php')
-rw-r--r-- | include/functions.php | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/include/functions.php b/include/functions.php index 2b7b7c586..72d86e0a7 100644 --- a/include/functions.php +++ b/include/functions.php @@ -929,7 +929,7 @@ function make_lockfile($filename) { $fp = fopen(LOCK_DIRECTORY . "/$filename", "w"); - if (flock($fp, LOCK_EX | LOCK_NB)) { + if ($fp && flock($fp, LOCK_EX | LOCK_NB)) { if (function_exists('posix_getpid')) { fwrite($fp, posix_getpid() . "\n"); } |