FAT | RFS | XFS | ZFS

isatty()

PROTOTYPE

#include <posix.h>

int isatty(int fid);

DESCRIPTION

isatty() determines whether the open file specified by fid is a terminal device. If so, isatty() returns TRUE. Otherwise, it sets errno and returns FALSE.

ERROR CODES

ENOTTY The file specified by fid is not a terminal device.

EXAMPLE

  /*-------------------------------------------------------------------*/
  /* If device is a terminal, ring its bell.                           */
  /*-------------------------------------------------------------------*/
  if (isatty(fid2))
    write(fid2, "\a", 1);