Museum

Home

Lab Overview

Retrotechnology Articles

⇒ Online Manual

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

ioctl(2)

isatty(3)

ttys(5)

TTYNAME(3)  —  UNIX Programmer’s Manual

NAME

ttyname, ttyslot − find name of a terminal

SYNOPSIS

char *ttyname(fildes)
int fildes;

ttyslot()

DESCRIPTION

Ttyname returns a pointer to the null-terminated path name of the terminal device associated with file descriptor fildes.

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), isatty(3), 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. 

7th Edition

Typewritten Software • bear@typewritten.org • Edmonds, WA 98026