From mboxrd@z Thu Jan 1 00:00:00 1970 Message-ID: <32d987d50611201218v5b4cbd23id6ac8d1fcfc53dda@mail.gmail.com> Date: Mon, 20 Nov 2006 21:18:24 +0100 From: "Federico Benavento" To: "Fans of the OS Plan 9 from Bell Labs" <9fans@cse.psu.edu> Subject: Re: [9fans] echo -n In-Reply-To: <5c2bf4a5c8ff68ef5e1bfd2db024e300@plan9.jp> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: quoted-printable Content-Disposition: inline References: <8ccc8ba40611201116r89eba04m32cf9d487a02ceb5@mail.gmail.com> <5c2bf4a5c8ff68ef5e1bfd2db024e300@plan9.jp> Topicbox-Message-UUID: e2cb6b70-ead1-11e9-9d60-3106f5b1d025 hola, On 11/20/06, Joel Salomon wrote: > > > The only real solution is to change the interface so that > > > end-of-file is not signaled by a zero-length read. But that > > > convention is far too entrenched to go anywhere any time soon. > > > > Isn=B4t it that a write of zero bytes should just not write, instead > > of meaning a write of zero bytes? > > > > Or did I miss something? > > That seems to be the definition under the Unix. From the Single UNIX > Specification, version 2 man page for write(): > If nbyte is 0, write() will return 0 and have no other results > if the file is a regular file; otherwise, the results are > unspecified. > SUS3 is more verbose, but seems to have the same intent. Does Plan 9 use= zero-length writes for something that shouldn't be changed? > > --Joel > > I don't think this is the norm, but I've seen this. you need a zero-length write to tell wikifs that you finished writing to /mnt/wiki/new, I figured this out the hard way, I couldn't understand why my script wasn't working, after a "echo -n" at the end everything worked just fine. --=20 Federico G. Benavento