cvs commit: src/sys/kern sys_generic.c

Andrey Chernov ache at
Sun Jul 3 01:10:18 GMT 2005

On Tue, Jan 25, 2005 at 11:37:32AM +0100, Poul-Henning Kamp wrote:
> In message <20050125103250.GA29461 at>, Andrey Chernov writes:
> >On Tue, Jan 25, 2005 at 11:26:32AM +0100, Poul-Henning Kamp wrote:
> >> Show me code which breaks please.
> >
> >It is not an argument. Your commit violates both POSIX and SUSv3, namely 
> >this thing:
> >
> >"This volume of IEEE Std 1003.1-2001 requires that no action be taken for 
> >read() or write() when nbyte is zero. This is not intended to take 
> >precedence over detection of errors (such as invalid buffer pointers or 
> >file descriptors). This is consistent with the rest of this volume of IEEE 
> >Std 1003.1-2001, but the phrasing here could be misread to require 
> >detection of the zero case before any other errors."
> Notice the "require" it doesn't ban the practice.
> Go look at fifofs: we never did that (please see also rev. 1.104

Well, lets don't touch whole fifo subject for a while (maybe it needs to 
be fixed or maybe not) to allow more focusing on our subject. I can't 
discuss all directions at once.

What's about "invalid buffer pointers" detection, directly mentioned in 
the standard (above)? Now it is broken for zero bytes read because your 
newly inserted check takes precedence.


More information about the cvs-all mailing list