TTYNAME(3C) INTERACTIVE UNIX System TTYNAME(3C)
NAME
ttyname, isatty - find name of a terminal
SYNOPSIS
char *ttyname (fildes)
int fildes;
int isatty (fildes)
int fildes;
DESCRIPTION
The ttyname function returns a pointer to a string contain-
ing the null-terminated path name of the terminal device
associated with file descriptor fildes.
Isatty returns 1 if fildes is associated with a terminal
device, 0 otherwise.
FILES
/dev/*
DIAGNOSTICS
The ttyname function returns a NULL pointer if fildes does
not describe a terminal device in directory /dev.
CAVEAT
The return value points to static data whose content is
overwritten by each call.
Rev. C Software Development Set Page 1