Guardian Native C Library Calls Reference Manual (G06.28+, H06.05+)
isatty(3) Guardian Native C Library Calls Reference Manual
NAME
isatty - Tests for a terminal
LIBRARY
G-series native Guardian processes: system library
G-series native OSS processes: system library
H-series native Guardian processes: implicit libraries
H-series OSS processes: implicit libraries
SYNOPSIS
#include <unistd.h>
int isatty(
int filedes);
PARAMETERS
filedes Specifies an open file descriptor.
DESCRIPTION
The isatty( ) function determines whether the device associated with the filedes parameter is a
terminal.
RETURN VALUES
The isatty( ) function returns the value 1 if the specified file descriptor is associated with a termi-
nal. Otherwise, it returns the value 0 (zero).
ERRORS
If any of the following conditions occurs, the isatty() function sets errno to the corresponding
value:
[EBADF] The filedes parameter is not a valid file descriptor.
[EISGUARDIAN]
The value used for the filedes parameter is appropriate only in the Guardian
environment.
STANDARDS CONFORMANCE
The POSIX standards leave some features to the implementing vendor to define. The following
features are affected in the HP implementation:
• The isatty( ) function returns errno values for various conditions.
The following are HP extensions to the XPG4 Version 2 specification:
• The isatty( ) function can return the errno value [EISGUARDIAN].
3−64 Hewlett-Packard Company 527192-007