Museum

Home

Lab Overview

Retrotechnology Articles

⇒ Online Manual

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

ioctl(2)

TTYNAME(3)

NAME

ttyname, isatty − find name of a terminal

USAGE

char *ttyname(filedes)

isatty(filedes)

DESCRIPTION

Ttyname returns a pointer to the null-terminated pathname 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; otherwise, it returns zero. 

NOTES

The return value points to static data whose content is overwritten by each call. 

FILES

/dev/∗
/etc/ttys

DIAGNOSTICS

Ttyname returns a null pointer (zero) if filedes does not describe a terminal device in directory ‘/dev’. 

RELATED INFORMATION

ioctl(2)

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