read.2: Clarify interaction of count==0 and error checking

POSIX deliberately leaves this case open, so the man
page should be less specific about what happens.

See http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=533232

Reported-by: Zack Weinberg <zackw@panix.com>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
This commit is contained in:
Michael Kerrisk 2013-02-12 22:30:02 +01:00
parent dc0e450b3e
commit 5ab77f3dab
1 changed files with 12 additions and 2 deletions

View File

@ -32,7 +32,7 @@
.\" Modified Sat Jul 12 20:45:39 1997 by Michael Haardt
.\" <michael@cantor.informatik.rwth-aachen.de>
.\"
.TH READ 2 2009-02-23 "Linux" "Linux Programmer's Manual"
.TH READ 2 2013-02-12 "Linux" "Linux Programmer's Manual"
.SH NAME
read \- read from a file descriptor
.SH SYNOPSIS
@ -62,7 +62,17 @@ If
.I count
is zero,
.BR read ()
returns zero and has no other results.
.I may
detect the errors described below.
In the absence of any errors,
of if
.BR read ()
does not check for errors, a
.BR read ()
with a
.I count
of 0 returns zero and has no other effects.
If
.I count
is greater than