Which pts linux
Best Answer. A tty is a native terminal device, the backend is either hardware or kernel emulated. More info can be found in man pty. Related Question. Difference between pts and tty Ask Question. Asked 10 years, 1 month ago. Active 4 years, 7 months ago. Viewed k times. Improve this question. Community Bot 1. See also How does a Linux terminal work? Add a comment. Active Oldest Votes. A tty is a native terminal device, the backend is either hardware or kernel emulated.
More info can be found in man pty. Improve this answer. What do you mean by the backend is hardware? Motivated: en. I take it that's a historical reference as opposed to contemporary use i. So basically a tty is something where there's no user process "on the other end"?
The purpose is to show that both TMUX server and sshd use ptmx, but they do not interfere with each other. This situation is a little more complicated, but the principle is the same. As can be seen from the above process, for user space programs, they are the same; from the perspective of the kernel, the other end of PTS is connected with ptmx, while the other end of TTY is connected with the terminal simulator of the kernel.
Both ptmx and terminal simulator are only responsible for maintaining sessions and forwarding packets. Here are some common configuration items. This configuration is generally controlled by the terminal. When the window size of the terminal changes, it is necessary to modify the configuration by certain means.
For example, there is a parameter to modify the window size in SSH protocol. After receiving the request from the client, sshd will modify the parameter of TTY through API, and TTY will notify the front-end program such as shell or VIM through sigwinch signal, and the front-end program will receive it After the signal, read this parameter of TTY, and then you will know how to adjust your output layout.
In addition to forwarding data between the terminal and the front-end process, TTY also supports many control commands. This is used to configure the corresponding input combination of control commands. These are two special control commands. It is estimated that someone will often encounter them.
This is because this command will tell TTY to pause and block all read and write operations, that is, no data will be forwarded. This function should be a legacy of history. In the past, there was no flow control function between the terminal and the server. Therefore, it is possible that the server sent data too fast, resulting in the terminal unable to process it.
Therefore, such a command is needed to tell the server not to send again, and inform the server to continue after the terminal has finished processing. One of the more commonly used scenarios of this command is to use the tail — f command to monitor the contents of log files.
Echo is the configuration item used to control the function. If it is — echo, it means disable echo function. This parameter is used to control whether to forward the output to the terminal, that is, whether the result will be displayed in the terminal. The default behavior of this signal is to pause the execution of myapp.
The default behavior is to pause the execution of the processes in the process group. How can the suspended process continue? Please refer to sigpoint in the next article. The default behavior of the process after receiving the signal is to exit the process. Its default behavior is to put the front-end process group to the back-end and suspend the execution of all processes in the process group. This paper introduces the common functions and features of TTY.
0コメント