Bell 32V development
authorTom London <tbl@research.uucp>
Sat, 9 Dec 1978 03:52:26 +0000 (22:52 -0500)
committerTom London <tbl@research.uucp>
Sat, 9 Dec 1978 03:52:26 +0000 (22:52 -0500)
Work on file usr/man/man3/ttyname.3

Co-Authored-By: John Reiser <jfr@research.uucp>
Synthesized-from: 32v

usr/man/man3/ttyname.3 [new file with mode: 0644]

diff --git a/usr/man/man3/ttyname.3 b/usr/man/man3/ttyname.3
new file mode 100644 (file)
index 0000000..b7d15ee
--- /dev/null
@@ -0,0 +1,43 @@
+.TH TTYNAME 3 
+.SH NAME
+ttyname, isatty, ttyslot \- find name of a terminal
+.SH SYNOPSIS
+.B char *ttyname(fildes)
+.PP
+.B isatty(fildes)
+.PP
+.B ttyslot()
+.SH DESCRIPTION
+.I Ttyname
+returns a pointer to the null-terminated path name
+of the terminal device associated with file descriptor
+.IR fildes .
+.PP
+.I Isatty
+returns 1 if
+.I fildes
+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 fildes
+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.