Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ isatty(3V) — OS/MP 4.1C

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

ctermid(3V)

ioctl(2)

ttytab(5)

TTYNAME(3V)  —  C LIBRARY FUNCTIONS

NAME

ttyname, isatty − find name of a terminal

SYNOPSIS

char ∗ttyname(fd)
int fd;

int isatty(fd)
int fd;

DESCRIPTION

ttyname() returns a pointer to the null-terminated path name of the terminal device associated with file descriptor fd.

isatty() returns 1 if fd is associated with a terminal device, 0 otherwise. 

FILES

/dev/∗

SEE ALSO

ctermid(3V), ioctl(2), ttytab(5)

RETURN VALUES

On success, ttyname() returns a pointer to the terminal device.  If fd does not describe a terminal device in directory /dev, ttyname() returns NULL. 

isatty() returns 1 if fd is associated with a terminal device.  It returns 0 otherwise. 

BUGS

The return value points to static data which are overwritten by each call. 

Solbourne Computer, Inc.  —  13 Dec 1990

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