CINXE.COM

tty

<html> <head> <title>tty</title> <META NAME="KEYWORDS" CONTENT="tty"> </head> <body BGCOLOR="#ffffff" LINK="#0000ff" VLINK="#0000ff" ALINK="#0000ff" TEXT="#000000"> <center> <h1><b>tty</b></h1></center> <PRE> <STRONG><A HREF="/man4/TTY">TTY(4)</A></STRONG> Linux Programmer's Manual <STRONG><A HREF="/man4/TTY">TTY(4)</A></STRONG> NAME tty - controlling terminal DESCRIPTION The file /dev/tty is a character file with major number 5 and minor number 0, usually with mode 0666 and ownership root:tty. It is a syn- onym for the controlling terminal of a process, if any. In addition to the <STRONG><A HREF="/man2/ioctl">ioctl(2)</A></STRONG> requests supported by the device that tty refers to, the <STRONG><A HREF="/man2/ioctl">ioctl(2)</A></STRONG> request TIOCNOTTY is supported. TIOCNOTTY Detach the calling process from its controlling terminal. If the process is the session leader, then SIGHUP and SIGCONT signals are sent to the foreground process group and all processes in the cur- rent session lose their controlling tty. This <STRONG><A HREF="/man2/ioctl">ioctl(2)</A></STRONG> call works only on file descriptors connected to /dev/tty. It 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 <STRONG><A HREF="/man1/chown">chown(1)</A></STRONG>, <STRONG><A HREF="/man1/mknod">mknod(1)</A></STRONG>, <STRONG><A HREF="/man2/ioctl">ioctl(2)</A></STRONG>, <STRONG><A HREF="/man2/ioctl_console">ioctl_console(2)</A></STRONG>, <STRONG><A HREF="/man2/ioctl_tty">ioctl_tty(2)</A></STRONG>, <STRONG><A HREF="/man3/termios">termios(3)</A></STRONG>, <STRONG><A HREF="/man4/ttyS">ttyS(4)</A></STRONG>, <STRONG><A HREF="/man4/vcs">vcs(4)</A></STRONG>, <STRONG><A HREF="/man7/pty">pty(7)</A></STRONG>, <STRONG><A HREF="/man8/agetty">agetty(8)</A></STRONG>, <STRONG><A HREF="/man8/mingetty">mingetty(8)</A></STRONG> COLOPHON This page is part of release 5.05 of the Linux man-pages project. A description of the project, information about reporting bugs, and the latest version of this page, can be found at https://www.kernel.org/doc/man-pages/. Linux 2019-03-06 <STRONG><A HREF="/man4/TTY">TTY(4)</A></STRONG></PRE> <center> <h6>Man Pages Copyright Respective Owners. Site Copyright (C) 1994 - 2025 <a href="http://www.he.net">Hurricane Electric</a>. All Rights Reserved.</h6></center> </body> </html>

Pages: 1 2 3 4 5 6 7 8 9 10