Museum

Home

Lab Overview

Retrotechnology Articles

⇒ Online Manual

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

termio(4)

TTY(4)  —  DEVICES AND NETWORK INTERFACES

NAME

tty − controlling terminal interface

DESCRIPTION

The file /dev/tty is, in each process, a synonym for the controlling terminal of that process, if any.  It is useful for programs or shell sequences that wish to be sure of writing messages on the terminal no matter how output has been redirected.  It can also be used for programs that demand the name of a file for output, when typed output is desired and it is tiresome to find out what terminal is currently in use. 

IOCTLS

In addition to the ioctls supported by the device that tty refers to, the following ioctl is supported:

TIOCNOTTY
Detach the current process from its controlling terminal, and remove it from its current process group, without attaching it to a new process group (that is, set its process group ID to zero).  This ioctl call only works on file descriptors connected to /dev/tty; this is used by daemon processes when they are invoked by a user at a terminal.  The process attempts to open /dev/tty; if the open succeeds, it detaches itself from the terminal by using TIOCNOTTY, while if the open fails, it is obviously not attached to a terminal and does not need to detach itself. 

FILES

/dev/tty

SEE ALSO

termio(4)

Sun Release 4.0  —  Last change: 16 February 1988

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