9fans archive / 2001 / 03 / 278 /    prev next

From: "Russ Cox" <rsc@pla...>
Subject: Re: [9fans] 9fs/9auth for FreeBSD
Date: Wed, 28 Mar 2001 16:50:25 -0500

    O_APPEND probably isn't needed on BSD kernels, either. That was me
    being paranoid based on the comment that writes didn't always get
    treated as appends.

No, it's needed.  The behavior on FreeBSD really is what
I said -- if you do a write with a file offset
that is not the end of the file, the write fails.
It doesn't pretend the offset really is at the 
end (as Plan 9 and apparently Linux do).  It fails.
Opening O_APPEND should, at least on a single system,
insulate you from worrying about the offset.
I hadn't thought of that.  (My Unix instincts
continue to dull.)

Russ