From mboxrd@z Thu Jan 1 00:00:00 1970 Message-Id: <200103281926.f2SJQnl94482@orthanc.ab.ca> From: Lyndon Nerenberg To: 9fans@cse.psu.edu Subject: Re: [9fans] 9fs/9auth for FreeBSD In-reply-to: Your message of "Tue, 27 Mar 2001 22:46:03 EST." <20010328034613.20C2F199ED@mail.cse.psu.edu> Date: Wed, 28 Mar 2001 12:26:49 -0700 Topicbox-Message-UUID: 760e9082-eac9-11e9-9e20-41e7f4b1d025 >>>>> "Russ" == Russ Cox writes: Russ> the biggest shortcoming Russ> is the lack of a portable way to implement append-only Russ> files. freebsd (and presumably the other unix clones) take Russ> append-only to mean "only appends succeed" rather than "all Russ> writes are treated as appends", and there's no standard way Russ> to enable even this. On 4.4BSD-derived systems you should be able to get the behaviour you want with chflags(path, UF_APPEND) after creating the file. During subsequent opens you would have to check for this flag, and open with O_APPEND if it is present (to force the writes to always be treated as appends). Did you try this? (I realize it's not very portable.) Without chflags() you would have to hijack on of the mode bits, which is downright evil. --lyndon