The isatty call

Go forward to The system call
Go backward to Console I/O
Go up to File-I/O remote protocol extension
Go to the top op gdb

The isatty(3) call

A special case in this protocol is the library call `isatty' which is
implemented as it's own call inside of this protocol.  It returns 1 to
the target if the file descriptor given as parameter is attached to the
GDB console, 0 otherwise.  Implementing through system calls would
require implementing `ioctl' and would be more complex than needed.