Re: flock
| From: | Hans-Peter Oeri | Date: | Mon, 01 Oct 2001 09:51:57 +0000 |
| Subject: | Re: flock | ||
| References: | 1 | Groups: | php.smarty.general |
| Request: | Send a blank email to php-smarty-general+get-1583@lists.php.net to get a copy of this message | ||
Hi!
Quoting Eugene Panin <varenich@yahoo.com>:
> I found that if I try to edit template file in text
> editor (during development process) then engine
> haven't access to this file because of flock in
Nope, the engine does not get a read lock, because the editor seems to hold a
write lock.
> As I understand, fopen with "r" option doesn't need
> flock. I think it will be useful to remove this flock.
It needs a way to ensure that read and write transactions do not occur
simultaniously. If you can ensure that, you don't need flock. Locking the file
is, however, the proper way!
You could use a text editor that does NOT permanently lock a file while editing
it (or, you probably can disable that feature somewhere in it). But the flock in
smarty seems absolutely right.
Don't conform!
IkKampfCaspar75