File:  [Power 6/32 Unix Tahoe 4.2BSD] / cci / usr / src / man / man3 / ttyname.3
Revision 1.1.1.1 (vendor branch): download - view: text, annotated - select for diffs
Sun Jul 28 12:24:19 2019 UTC (7 years ago) by root
Branches: bsd, MAIN
CVS tags: v12b, v121, HEAD
Power 6/32 Unix version 1.2b

.TH TTYNAME 3  "19 January 1983"
.SH NAME
ttyname, isatty, ttyslot \- find name of a terminal
.SH SYNOPSIS
.B char *ttyname(filedes)
.PP
.B isatty(filedes)
.PP
.B ttyslot()
.SH DESCRIPTION
.I Ttyname
returns a pointer to the null-terminated path name
of the terminal device associated with file descriptor
.I filedes
(this is a system file descriptor and has nothing to do with the
standard I/O FILE typedef).
.PP
.I Isatty
returns 1 if
.I filedes
is associated with a terminal device, 0 otherwise.
.PP
.I Ttyslot
returns the number of the entry in the
.IR ttys (5)
file for the control terminal of the current process.
.SH FILES
/dev/\(**
.br
/etc/ttys
.SH SEE ALSO
ioctl(2), ttys(5)
.SH DIAGNOSTICS
.I Ttyname
returns a null pointer (0) if
.I filedes
does not describe a terminal device in directory `/dev'.
.PP
.I Ttyslot
returns 0 if `/etc/ttys' is inaccessible or if
it cannot determine the control terminal.
.SH BUGS
The return value points to static data
whose content is overwritten by each call.

unix.superglobalmegacorp.com

This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.