3 ms·
renameat2 is meant to be atomic. From the man page: If newpath already exists, it will be atomically replaced, so that there is no point at which another p
by sargun 7y ago
renameat2 is meant to be atomic. From the man page:
If newpath already exists, it will be atomically replaced, so that
there is no point at which another process attempting to access
newpath will find it missing. However, there will probably be a
window in which both oldpath and newpath refer to the file being
renamed.
- Animats 7y agoYes, that's one of the many workarounds for not having unit files. There are different workarounds in the Windows world, and the Linux workround does not work on some file system types.