Function isatty

Top 

 

Declaration:

int isatty(long handle);

Description

Checks for device type.

isatty determines, whether handle is associated with any one of the following character devices:

       a terminal
       a console
       a printer
       a serial port

Returned value

If the device is one of the four character devices listed above, then isatty returns a nonzero integer. Otherwise, isatty returns 0.