Defect report from : Tim Freeman , fungible.com
(Please direct followup comments direct to yyyyyyyyyyyyyy@xxxxxxxxxxxxx)
@ page 0 line 0 section read objection {1}
Problem:
Edition of Specification (Year): 2003
Defect code : 2. Omission
http://www.opengroup.org/onlinepubs/007904975/functions/read.html
The spec does not quite say that in the normal case, if you read
from a regular file and the requested number of bytes is available,
you get all of them. For example, I believe the intent was that
if a file descriptor is at position 0 of a 5 byte plain file, and
3 bytes are read, then you are guaranteed to read all 3 bytes, but
this is not quite what was specified. "if" was used when "only if" was
intended.
Action:
In
http://www.opengroup.org/onlinepubs/007904975/functions/read.html
change
The value returned may be less than nbyte if the number of bytes left in
the file is less than nbyte, if the read() request was interrupted by a
signal, or if the file is a pipe or FIFO or special file and has fewer
than nbyte bytes immediately available for reading.
to
The value returned may be less than nbyte only if the number of bytes
left in the file is less than nbyte, the read() request was interrupted
by a signal, or the file is a pipe or FIFO or special file and has fewer
than nbyte bytes immediately available for reading.
|