2 ms·
Currently many people writes to a new file and `rename` into the old one to achieve the first kind of guarantee.
by netheril96 11y ago
Currently many people writes to a new file and `rename` into the old one to achieve the first kind of guarantee.
- Animats 11y agoLinux has added "renameat()" and "renameat2()", which are supposed to be atomic if the system does not crash but are not guaranteed to recover cleanly. Some networked file systems (NFS, at least) can't do an atomic rename; if you lose the network connection during the switch you may be in an invalid state.