Test whether a file descriptor refers to a terminal
Include
<unistd.h>
Prototype
int isatty(int fd);
Argument
fd |
Return Value
Returns 1 if fd
is an open file descriptor referring to a terminal;
otherwise 0 is returned, and errno
is set to indicate the error.
Suitable values may be EBADF
or ENOTTY
.
Remarks
This function is implemented as a stub that must be completed to suite the application.
The isatty()
function tests whether fd
is an open file
descriptor referring to a terminal.
Source File
isatty.c