IEEE Standards Interpretation for IEEE Std 1003.1™-1990 IEEE Standard for Information Technology--Portable Operating System Interfaces (POSIX®)
Copyright © 2001 by the Institute of Electrical and Electronics Engineers, Inc. 3 Park Avenue New York, New York 10016-5997 USA All Rights Reserved.
Interpretations are issued to explain and clarify the intent of a standard and do not constitute an alteration to the original standard. In addition, interpretations are not intended to supply consulting information. Permission is hereby granted to download and print one copy of this document. Individuals seeking permission to reproduce and/or distribute this document in its entirety or portions of this document must contact the IEEE Standards Department for the appropriate license. Use of the information contained in this document is at your own risk.
IEEE Standards Department Copyrights and Permissions 445 Hoes Lane, Piscataway, New Jersey 08855-1331, USA
Topic: ignoring errors Relevant Sections: 126.96.36.199, 188.8.131.52, B.6.4
In 184.108.40.206 Description [Read from a File], page 116, line 116:
"If nbyte is zero, the read() function shall return zero and have no other results."
In 220.127.116.11 Description [Write to a File], page 118, lines 190-191:
"If nbyte is zero and the file is a regular file, the write() function shall return zero and have no other results."
In B.6.4 Input and Output, page 266, lines 3433-3438:
"POSIX.1 requires that no action be taken when nbyte is zero. This is not intended to take precedence over the detection of errors (such as invalid buffer pointers or file descriptors). This is consistent with the rest of POSIX.1, but the phrasing here could be misread to require the detection of the zero case before any other errors. A value of zero is considered a correct value, for which the semantics are a no-op."
Rather than being a misreading, the interpretation of 18.104.22.168 and 22.214.171.124 that other errors shall be ignored seems to be the only possible interpretation permitted by the normative text. Is the rationale in error?
The text in 126.96.36.199 and 188.8.131.52 describes the behaviour only in the absence of error conditions. The rationale is therefore correct.
Rationale for Interpretation
By convention, the Description describes behaviour only in the absence of error conditions, unless explicitly stated. It is expected that a future issue of the standard will clarify this. The original intention in this case was to leave error checking optional.