4 ms·
Nagle, I believe I last read your comment on this (https://news.ycombinator.com/item?id=13964053 https://news.ycombinator.com/item?id=13964053), progress has be
by sargun 7y ago
Nagle, I believe I last read your comment on this (https://news.ycombinator.com/item?id=13964053 https://news.ycombinator.com/item?id=13964053), progress has been made .
We have the temporary files you're asking for. https://lwn.net/Articles/619146/ https://lwn.net/Articles/619146/
With O_TMPFILE, you can also write new data, and then automatically replace a file on disk.
- Animats 7y agoWith O_TMPFILE, you can also write new data, and then automatically replace a file on disk. How? Using "linkat"? That's not automatic.
- sargun 7y agorenameat2 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.