in reply to open for append

I learned that the POSIX C library guarantees that, when multiple processes are writing to the same file, and all of them have the file opened for appending, data shall not be lost.
But I don't think that guarantees that data won't be interleaved, with output from process A in the middle of a write from process B. Does it?

Replies are listed 'Best First'.
Re^2: open for append
by perrin (Chancellor) on Aug 25, 2005 at 11:10 UTC
    It does. It seeks to the end before every write.
      Make sure to note merlin's comment below. It's not sufficient to seek then write in userspace, because it's not atomic. It needs to happen in the kernel, not libc.