Bell 32V release
[unix-history] / usr / man / man3 / ttyname.3
CommitLineData
480adfa6
TL
1.TH TTYNAME 3
2.SH NAME
3ttyname, isatty, ttyslot \- find name of a terminal
4.SH SYNOPSIS
5.B char *ttyname(fildes)
6.PP
7.B isatty(fildes)
8.PP
9.B ttyslot()
10.SH DESCRIPTION
11.I Ttyname
12returns a pointer to the null-terminated path name
13of the terminal device associated with file descriptor
14.IR fildes .
15.PP
16.I Isatty
17returns 1 if
18.I fildes
19is associated with a terminal device, 0 otherwise.
20.PP
21.I Ttyslot
22returns the number of the entry in the
23.IR ttys (5)
24file for the control terminal of the
25current process.
26.SH FILES
27/dev/*
28.br
29/etc/ttys
30.SH SEE ALSO
31ioctl(2), ttys(5)
32.SH DIAGNOSTICS
33.I Ttyname
34returns a null pointer (0) if
35.I fildes
36does not describe a terminal device in directory `/dev'.
37.PP
38.I Ttyslot
39returns 0 if `/etc/ttys' is inaccessible or if
40it cannot determine the control terminal.
41.SH BUGS
42The return value points to static data
43whose content is overwritten by each call.