note 43454 added to function.flock
| From: | lockwang at rn2 dot php dot net | Date: | Tue, 22 Jun 2004 02:28:02 +0000 |
| Subject: | note 43454 added to function.flock | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-71473@lists.php.net to get a copy of this message | ||
your code has a mistake , i think you should change[ $lf = @fopen ($lf, 'x');] to [ $lf
= @fopen ($lock, 'x');]
and your code has a big problem that if your lockfile is not unlinked for any reason and your
function will not work properly. so i think your function is not a good one.
----
Manual Page -- http://www.php.net/manual/en/function.flock.php
Edit -- http://master.php.net/manage/user-notes.php?action=edit+43454
Delete -- http://master.php.net/manage/user-notes.php?action=delete+43454&report=yes
Reject -- http://master.php.net/manage/user-notes.php?action=reject+43454&report=yes
Search -- http://master.php.net/manage/user-notes.php