Remix.run Logo
ozgrakkurt 6 hours ago

It depends on what you mean by atomic. If it is only writing to page cache and you are writing a small amount then yes?

If there is a failure like a crash or power outage etc. then it doesn’t work like that.

You might as well be pushing into an in-memory data structure and writing to disk at program exit in terms of reliability

jeffbee 6 hours ago | parent [-]

You are projecting imaginary features onto O_APPEND and then hypothesizing that your imaginary features might not work.

POSIX says that for a file opened with O_APPEND "the file offset shall be set to the end of the file prior to each write." That's it. That's all it does.