Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ isatty(3C) — SunOS 5.1

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

gettext(3I)

setlocale(3C)

ttyname(3C)

NAME

ttyname, isatty − find name of a terminal

SYNOPSIS

#include <stdlib.h>

char ∗ttyname(int fildes);

int isatty(int fildes);

DESCRIPTION

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

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

RETURN VALUES

ttyname() returns a NULL pointer if fildes does not describe a terminal device in directory /dev. 

FILES

/dev/∗

SEE ALSO

gettext(3I), setlocale(3C)

NOTES

If the application is linked with −lintl, then messages printed from this function are in the native language specified by the LC_MESSAGES locale category; see setlocale(3C). 

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

SunOS 5.1  —  Last change: 13 Jul 1990

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