Re: flock
| From: | Hans-Peter Oeri | Date: | Mon, 01 Oct 2001 11:58:56 +0000 |
| Subject: | Re: flock | ||
| References: | 1 | Groups: | php.smarty.general |
| Request: | Send a blank email to php-smarty-general+get-1585@lists.php.net to get a copy of this message | ||
Hi!
Quoting Ivo Jansch <ivo@ibuildings.nl>:
> Smarty does not do write transactions on this file, so in my opinion
> it's not Smarty's job to ensure this. Smarty should render the file as
In order to ensure this, writing applications have to get a write lock and
reading applications need a read lock on the file. If smarty does not try to
get a read lock, it could happen that smarty reads the file during a write
transaction -> big mess.
Even if smarty does only READ the file, getting a READ LOCK is the correct
behaviour.
> recompile once their done. Since they must do that anyway, I don't see a
> reason to do a flock here.
Principally, you should flock any file you read or write to (or some other
means of locking a file (or relevant parts thereof) that all applications agree
upon). With the possible exemption of atomic transactions...
Don't conform!
IkKampfCaspar75