Sample Header Ad - 728x90

Why a pair of pseudo-terminals?

5 votes
2 answers
1122 views
My question is more about the conception and design of pty than how it works. I read chapter 64 (pseudo-terminals) of "The Linux Programming Interface" book and I can't understand why we use a pair of pseudo-terminal (ptmx, pts) and not one. When we look at /dev/tty[1,6], the virtual terminal is emulated and use one file. Why not do the same thing for pseudo-terminal and design an emulated system using one file instead of two?
Asked by etchttpd (79 rep)
Oct 12, 2019, 02:17 AM
Last activity: Jun 9, 2022, 07:20 PM