From mboxrd@z Thu Jan 1 00:00:00 1970 Message-ID: <5c2bf4a5c8ff68ef5e1bfd2db024e300@plan9.jp> To: 9fans@cse.psu.edu Subject: Re: [9fans] echo -n From: Joel Salomon Date: Mon, 20 Nov 2006 14:57:10 -0500 In-Reply-To: <8ccc8ba40611201116r89eba04m32cf9d487a02ceb5@mail.gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Topicbox-Message-UUID: e2c09ce0-ead1-11e9-9d60-3106f5b1d025 > > 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. >=20 > Isn=C2=B4t it that a write of zero bytes should just not write, instead > of meaning a write of zero bytes? >=20 > 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=E2=80=99t be changed? --Joel