Contents
What is tty driver?
A tty driver is a STREAMS driver managing the actual connection to the hardware terminal. Depending on the connection, three kinds of tty drivers are provided: asynchronous line drivers, the pty driver, and the LFT driver.
What does tty stand for programming?
In computing, tty is a command in Unix and Unix-like operating systems to print the file name of the terminal connected to standard input. tty stands for TeleTYpewriter.
What is Pty process?
The pty module defines operations for handling the pseudo-terminal concept: starting another process and being able to write to and read from its controlling terminal programmatically. Because pseudo-terminal handling is highly platform dependent, there is code to do it only for Linux.
What are TTY devices in Linux?
In essence, tty is short for teletype, but it’s more popularly known as terminal. It’s basically a device (implemented in software nowadays) that allows you to interact with the system by passing on the data (you input) to the system, and displaying the output produced by the system. ttys can be of different types.
What does TTY do between master and slave?
Between master and slave sits the TTY driver (line discipline, session management, etc.) which copies stuff from/to PTY master and slave. Let’s see what happens when…
What do characters typed get sent to the pty master?
Characters typed get send to the PTY master and from there to the TTY driver which implements the line discipline.
Which is the default line discipline in Linux?
You can attach a SLIP line discipline for instance to get a network interface on top of a serial device (or pty device), or you can have a tty line discipline. The tty line discipline is the default line discipline at least on Linux for serial and pty devices.
What is the function of the line discipline?
The line discipline is in charge of converting special characters (like end of line, backspaces), and echoing what has been received back to the teletype, so that the user can see what it has been typed (line disciplines will be discussed in the next post of the series). It is also responsible to buffer the characters.