Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:
I need to update a file for each process and let each process read the newest version of the file.
I make a temporary file and copy the new version over the old one. I lock the file during write.
It is possible one process read the file before the write is complete. How to guaranty hundreds of processes read the file at same time and each process get the different newest one? Suppose I do not have database.
Thanks everyone.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
(tye)Re: Each process needs to read the newest version of the file
by tye (Sage) on Jan 20, 2001 at 01:17 UTC | |
by Anonymous Monk on Jan 21, 2001 at 08:02 UTC | |
by tye (Sage) on Jan 21, 2001 at 10:01 UTC |