lkml.org 
[lkml]   [1999]   [Jun]   [7]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PROBLEM+PATCH] 2.X zero-length read on non-empty pipe returns EAGAIN
Date
From
> This problem was observed with kernel 2.2.9 on an i386, but appears
> from the source to be present in all 2.X kernels.
>
> Description: a read() with count=0 on a pipe that is not empty
> should return 0; instead it returns -1 with EAGAIN.

Yes. That is incorrect according to SUS.

> Fix: *If* the manual page for read() is correct in saying that
> a read of length zero should always return 0 and do nothing else,

[It is]

> then the enclosed patch is probably right. (Somebody who knows, please
> check that it should indeed come after the invalid seek test---I don't
> know enough about what the fs routines are defined to do.)

The seek test is for pread(). The spec is unclear if that test comes
first

Alan


-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-03-22 13:52    [W:0.026 / U:0.488 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site