isatty

Tests whether the specified handle refers to a screen

Local Servers:nonblocking
Remote Servers:nonblocking
Classification:POSIX
Platform:NLM
Service:Operating System I/O

Syntax

  #include <unistd.h>  
   
  int isatty  (  
     int   handle);
  

Parameters

handle
(IN) Specifies a file handle.

Return Values

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:

4

EBADF

Bad file number.

Remarks

The isatty function tests if the opened file or device referenced by the file handle is a character device (namely, the console).

See Also

dup, dup2, open