Luke Kenneth Casson Leighton wrote: [] > > see lib/util_file.c in the SAMBA_TNG branch (http://samba.org/cvs.html or > http://samba.org/cgi-bin/cvsweb/samba/source/lib/util_file.c) > > we have a function startpwfile_race_condition_avoid() which may be what > you are looking for. Classical example -- preventing simultaneous updates to the same file and using copy+replace and lock inside that same file -- that shows nicely how _difficult_ to implement this right way. I wrote something like this (very close, really) some years ago when I have trouble with corrupted mailboxes that was updated this way (some app, I doesnt remember what for now, didn't used .dotlocks for _mailboxes_!)... Thanks for a pointer. Regards, Michael.