How to safely maintain a status file

Christian Heimes lists at cheimes.de
Mon Jul 9 19:41:44 EDT 2012


Am 09.07.2012 22:24, schrieb John Nagle:
>     Rename on some file system types (particularly NFS) may not be atomic.

The actual operation is always atomic but the NFS server may not notify
you about success or failure atomically.

See http://linux.die.net/man/2/rename, section BUGS.

>   That's because you're using the wrong approach. See how to use
> ReplaceFile under Win32:
> 
> http://msdn.microsoft.com/en-us/library/aa365512%28VS.85%29.aspx

The page doesn't say that ReplaceFile is an atomic op.

Christian




More information about the Python-list mailing list