This is similar to the discussion of locking when writing in Camle 3, where it states that the simpler open, flock sequence used for reading isn't adequate. BUT I believe OP's use of a separate semaphore file got around that issue, as he never does anything with the counter file until the flock on the semaphore file returns.
--Bob Niederman, http://bob-n.com
All code given here is UNTESTED unless otherwise stated.
In reply to Re: Re: Mysterious Disapperance of file contents
by bobn
in thread Mysterious Disapperance of file contents
by Gorby
For: | Use: | ||
& | & | ||
< | < | ||
> | > | ||
[ | [ | ||
] | ] |