Museum

Home

Lab Overview

Retrotechnology Articles

⇒ Online Manual

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

ioctl(2)

ttys(5)



TTYNAME(3C)             COMMAND REFERENCE             TTYNAME(3C)



NAME
     ttyname, isatty, ttyslot - find name of a terminal

SYNOPSIS
     char *ttyname(filedes)

     isatty(filedes)

     ttyslot()

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; it is 0 otherwise.

     Ttyslot returns the number of the entry in the ttys(5) file
     for the control terminal of the current process.

FILES
     /dev/*

     /etc/ttys

DIAGNOSTICS
     Ttyname returns a null pointer (0) if filedes 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.

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

SEE ALSO
     ioctl(2) and ttys(5).














Printed 3/13/89                                                 1



%%index%%
na:336,102;
sy:438,606;
de:1044,826;
fi:1870,105;
di:1975,543;
ca:2518,171;
se:2689,139;
%%index%%000000000122

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