pxfisatty

Date:

10-20-2011

NAME

PXFISATTY - Determines if file descriptor corresponds to a valid file descriptor

SYNOPSIS

INTEGER ifildes, ierror
LOGICAL isatty
CALL PXFISATTY(ifildes, isatty, ierror)

IMPLEMENTATION

Cray Linux Environment (CLE)

STANDARDS

IEEE Std 1003.9-1992 standard interface for FORTRAN 77

DESCRIPTION

The PXFISATTY routine uses isatty to determine if ifildes is a valid file descriptor for a terminal.

All arguments must be of default kind unless documented otherwise. Default kind is KIND=4 for integer, real, complex, and logical arguments.

The following is a list of valid arguments for this routine:

ifildes

Specifies an input integer variable containing the file descriptor to be checked for an associated terminal.

isatty

Specifies an output logical variable that is TRUE when ifildes is a file descriptor with an associated terminal. Otherwise, isatty is FALSE.

ierror

An output integer variable for the PXFISATTY completion status. ierror contains zero if PXFISATTY was successful.

EXAMPLES

program pxftest
integer len, ifildes, ierror, O_RDONLY
character*20 path
logical isatty
CALL PXFCTERMID(path,len,ierror)
CALL PXFCONST('O_RDONLY',O_RDONLY,error)
CALL PXFOPEN(path,len,O_RDONLY,400,ifildes,error)
CALL PXFISATTY(ifildes,isatty,ierror)
print *,isatty
end

SEE ALSO

PXFCONST(3F), PXFOPEN(3F), ttyname(3c)