in reply to The necessity of flock-ing files that are only to be read.
As I only plan to read the file - does this indicate I do not need to lock it? It is a static file and will theoretically not be changed ever. Should I use shared locks or are these rendered unnecessary by the fact I never plan to write or append to the file?If your scripts (or any other programs) don't modify the files you don't need to lock them.
The only reason to (shared-)lock files you are reading is when both:
On the other hand, if I use a file for passing data from one program to the other, I really need the data to be consistant, so I should use locking on the read and the writing side.
Hope this clears it up a bit ;-)
-- Joost downtime n. The period during which a system is error-free and immune from user input.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Re: The necessity of flock-ing files that are only to be read.
by Nemp (Pilgrim) on Sep 02, 2002 at 15:57 UTC |