bsd man page for ttyslot

Query: ttyslot

OS: bsd

Section: 3

Format: Original Unix Latex Style Formatted with HTML and a Horizontal Scroll Bar

TTYNAME(3)						     Library Functions Manual							TTYNAME(3)

NAME
ttyname, isatty, ttyslot - find name of a terminal
SYNOPSIS
char *ttyname(filedes) isatty(filedes) ttyslot()
DESCRIPTION
Ttyname returns a pointer to the null-terminated path name of the terminal device associated with file descriptor filedes (this is a system file descriptor and has nothing to do with the standard I/O FILE typedef). Isatty returns 1 if filedes 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 filedes 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. 7th Edition May 15, 1985 TTYNAME(3)
Related Man Pages
isatty(3) - mojave
ttyname(3) - netbsd
isatty(3) - osx
ttyslot(3) - osx
isatty(3) - freebsd
Similar Topics in the Unix Linux Community
Mac OS X: Based on UNIX - Solid As a Rock
Is UNIX an open source OS ?
drew77
Is it safe to install x86 Solaris 10 U6 after installed-Linux-and-FreeBSD?