Indicates if a specified file descriptor is associated with a terminal.
#include <unistd.h> int isatty (int file_desc);
1 | If the file descriptor is associated with a terminal. |
0 | If the file descriptor is not associated with a terminal. |
-1 | Indicates an error (for example, if the file descriptor is not associated with an open file). |