PASC Interpretation Ref: pasc-1003.5-07
Topic: Can IS_A_TERMINAL detect/report errors?


This is an unapproved interpretation of PASC P1003.5-1992.

Use of the information contained in this unapproved document is at your own risk.

Last update: 04 September,1996


                                                                1003.5-92 #7

	Class: Defect situation

The standard requires different behavior to the C language binding
for conforming implementations. This  is being
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:			Can IS_A_TERMINAL detect/report errors?
	Relevant Sections:	IEEE Std 1003.5-1992:  section 6.1.4,
			     	IEEE Std 1003.1-1990:  section 4.7.2


Interpretation Request:
-----------------------

IEEE Std 1003.1 does not specify that isatty() can detect or report
any errors.  IEEE Std 1003.5 specifies errors that are required to be
detected/reported by IS_A_TERMINAL.

IEEE Interpretation for 1003.1-1990 (9945-1:1990):
--------------------------------------------------

The standard is currently incorrect, in that it should not require
Is_A_Terminal to detect any errors.  However, Is_A_Terminal is still
required to return True if it can 'prove' that the parameter File is
associated with a terminal.

Conforming applications should not assume that a value of False
returned by Is_A_Terminal indicates that no errors as specified in
POSIX.5 6.1.4 were detected.  

Rationale for Interpretation:
-----------------------------

POSIX.1 clearly does not require error checking, but it strongly
implies that a 'success' value (1) can be trusted.  A failure value
means either that the file descriptor is not a terminal, or that some
other error occurred.  Therefore, conforming POSIX.5 applications can
depend on the value True indicates a terminal device, but cannot apply
any additional meaning to the value False returned by Is_A_Terminal.

Editorial note for future revision of standard (not part of the interpretation)
-------------------------------------------------------------------------------

This wording will be corrected in the P1003.5a revision.

 _____________________________________________________________________________