note 29179 rejected from function.flock by nicos
| From: | nicos@php.net | Date: | Wed, 05 Feb 2003 11:33:53 +0000 |
| Subject: | note 29179 rejected from function.flock by nicos | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-43452@lists.php.net to get a copy of this message | ||
[Quote]You should lock the file _before_ opening it, and unlock _after_ closing it. Othervise an
another process might be able to access the file between the lock/unlock and the open/close
operation.[/Quote]
How should work that?
I don't know how I should lock the file before opening because a resource handle is needed
therefor. But a resource handle can only be optained by opening it. o_O?