Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ ttyname(3) — Ultrix-11 3.1

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

ioctl(2)

ttyslot(3)

ttyslot(3v)

ttys(5)

ttyname(3)

NAME

ttyname, isatty, − find name of a terminal

SYNTAX

char *ttyname(fildes)
int fildes;

isatty(fildes)
int fildes;

DESCRIPTION

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

The isatty returns 1 if fildes is associated with a terminal device, 0 otherwise. 

FILES

/dev/*
/etc/ttys

RESTRICTIONS

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

DIAGNOSTICS

The ttyname subroutine returns a null pointer (0) if fildes does not describe a terminal device in the /dev directory. 

SEE ALSO

ioctl(2), ttyslot(3), ttyslot(3v), ttys(5)

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