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:
| EBADF | CAUSE
 | 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)