[Gambas-user] Locking files - best method

Rolf-Werner Eilert eilert-sprachen at ...221...
Thu Feb 12 08:27:18 CET 2009


Good morning, folks :-)

Once upon a time, maybe some weeks or even months ago, we had a 
discussion about how to lock a file for other users while it is written.

My usual way was (and still is) using a xxx.lock file for indication.

Someone on the list pointed me to the danger of overlapping 
file-creation and directory-reading so that in rare cases there would be 
no locking effect. He used locking by creating a lock-directory. After 
some 6 months in use, I have to admit that he was right. Every 6 or 8 
weeks or so, there is a collision with my system.

I can't find these posts in the archives anymore, so please could you 
(whoever it was :-) ) give me your idea of locking by directory again?

Thanks a lot in advance!

Rolf




More information about the User mailing list