HPlogo MPE/iX Developer's Kit Reference Manual Volume I: HP 3000 MPE/iX Computer Systems > Chapter 4  POSIX/iX Library Function Descriptions

isatty

» 

Technical documentation

Complete book in PDF
» Feedback

 » Table of Contents

 » Index

Determines whether or not an open file descriptor is associated with a terminal.

Syntax

   #include <unistd.h>

   int isatty (int fildes);

Parameters

fildes

An open file descriptor.

Return Values

1

The specified file descriptor is associated with a terminal.

0

The specified file descriptor is not associated with a terminal.

-1

The specified file descriptor is invalid, and errno is set to indicate the error condition.

Description

The isatty() function returns a value indicating whether or not the open file descriptor fildes is associated with a terminal.

Implementation Considerations

Refer to the EBADF error description below.

Errors

If an error occurs, errno is set to the following value:

EBADFCAUSE The fildes parameter is not a valid open file descriptor.
 ACTION Check to see if fildes has been altered or not initialized.

See Also

POSIX.1 (Section 4.7.2)

Feedback to webmaster