From mboxrd@z Thu Jan 1 00:00:00 1970 Message-ID: <44809f38e4eeaf493d03cc1f401dba7d@vitanuova.com> From: C H Forsyth Date: Fri, 6 Jul 2007 15:57:21 +0100 To: 9fans@cse.psu.edu Subject: Re: [9fans] implementing 9p read In-Reply-To: <93f71afb320e8cd61cd2ff3f9f08ebbe@quintile.net> MIME-Version: 1.0 Content-Type: text/plain; charset="US-ASCII" Content-Transfer-Encoding: 7bit Topicbox-Message-UUID: 91eb3b12-ead2-11e9-9d60-3106f5b1d025 >You cannot do this, the usual idiom is that if read returns less >than the app expected this is treated as EOF. in my library the low level a write that returns less than was written is trouble, but end-of-file is a read returning zero. the count returned by read can be less than the amount requested without marking end-of-file (eg, reads on a pipe or network connection). that's why readn exists.