TTYNAME
Section: C Library Functions (3)
Index
Return to Main Contents
NAME
ttyname, isatty, ttyslot - find name of a terminal
SYNOPSIS
char *ttyname(fildes)
isatty(fildes)
ttyslot()
DESCRIPTION
Ttyname
returns a pointer to 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.
Ttyslot
returns the number of the entry in the
ttys(5)
file for the control terminal of the
current process.
FILES
/dev/*
/etc/ttys
SEE ALSO
ioctl(2), ttys(5)
DIAGNOSTICS
Ttyname
returns a null pointer (0) if
fildes
does not describe a terminal device in directory `/dev'.
Ttyslot
returns 0 if `/etc/ttys' is inaccessible or if
it cannot determine the control terminal.
BUGS
The return value points to static data
whose content is overwritten by each call.
Index
- NAME
-
- SYNOPSIS
-
- DESCRIPTION
-
- FILES
-
- SEE ALSO
-
- DIAGNOSTICS
-
- BUGS
-
This document was created by
man2html,
using the manual pages.
Time: 10:17:19 GMT, December 28, 2024