Use of the information contained in this unapproved document is at your own risk
.Last update: 04 September,1996
1003.5-92 #5
Class: Ambiguous
The standard is unclear on this issue, and no conformance distinction
can be made on alternative implementations based on this. It is thus
possible that the standard could be read to conflict with the C language
binding, which was not the intent. This will be referred to the sponsor
for clarifying wording in the next amendment.
This response will be incorporated in an IEEE interpretations
publication, and will be also made available on-line on the IEEE
SPAsystem.
_____________________________________________________________________________
Interpretation Number: XXXX
Topic: Behavior of Read when interrupted by a signal
Relevant Sections: IEEE Std 1003.5-1992: section 6.1.2,
IEEE Std 1003.1-1990: section 6.4.1.2
Interpretation Request:
-----------------------
What exactly is the behavior of a read operation when interrupted by a
signal? Is it partial read with a normal return, or is POSIX_ERROR
raised with the error code INTERRUPTED_BY_SIGNAL?
IEEE Interpretation for 1003.1-1990 (9945-1:1990):
--------------------------------------------------
POSIX.1, lines 125-128, clarifies the exact behavior of read() in the
face of signals. EINTR is returned if -NO- data can be read,
otherwise a partial read occurs.
POSIX.5 does not make this distinction clear, but the intent is to
match POSIX.1. Therefore, POSIX_Error (error code
Interrupted_Operation) shall be raised when the operation is
interrupted by a signal and no data has been transferred. If some
data has been transferred, and the operation is interrupted by a
signal, then Read shall transfer this data into Buffer and return the
number of elements transferred in the parameter Last.
Rationale for Interpretation:
-----------------------------
POSIX.5 does not prohibit the behavior specified in POSIX.1, nor does
it make it clear. This interpretation clarifies the exact behavior of
POSIX.5 to match POSIX.1.
Editorial note for future revision of standard (not part of the interpretation)
-------------------------------------------------------------------------------
We will add text to make this distinction clear in the P1003.5a revision.
_____________________________________________________________________________