isatty
Tests whether the specified handle refers to a screen
#include <unistd.h>
int isatty (
int handle);
isatty n returns a value of 0 if the device or file is not a character device; otherwise, a nonzero is returned.
If an error occurs, errno can be set to:
The isatty function tests if the opened file or device referenced by the file handle is a character device (namely, the console).