in reply to (tye)Re: Each process needs to read the newest version of the file
in thread Each process needs to read the newest version of the file

Thanks, Tye.

I want to modify line by line of a file to make a temporary one and rename it to the original file. If the file is really big, it may take a while to get it done. During the time, there might be a lot of processes reading the file at same time. How to make sure what each of this processes read is the newest modified version?

Thanks again.

JJ

  • Comment on Re: (tye)Re: Each process needs to read the newest version of the file

Replies are listed 'Best First'.
(tye)Re2: Each process needs to read the newest version of the file
by tye (Sage) on Jan 21, 2001 at 10:01 UTC

    I'm not sure I understand. If you do what I suggested which is what you just redescribed above, then the readers will always read the most recent completed version of the file each time they reopen the file.

            - tye (but my friends call me "Tye")