3 ms·
I don’t think you can atomically append more than one byte to files in unixes (the write call can return after having written some but not all requested bytes)
by Someone 6y ago
I don’t think you can atomically append more than one byte to files in unixes (the write call can return after having written some but not all requested bytes)
(Haven’t googled, but if that’s possible, I don’t see why write would have that limitation)
- millstone 6y agoYeah, and eventually we reach the best-effort bedrock. Maybe the file is on a NFS mount, you call write(), it goes over the wire, who knows what happens!
- LunaSea 6y agoInteresting and confirmed in the write() syscall man pages. Thanks! Do you have any other resources regarding these types of low level "gotchas"? I remember PostgreSQL having such an issue two years ago for example.