|
|
The pseudo-terminal subsystem (pseudo-tty) supports a pair of STREAMS-based devices called the ``master'' device and ``slave'' device. The slave device provides processes with an interface that is identical to the terminal interface. However, where all devices that provide the terminal interface have some hardware device behind them, the slave device has another process manipulating it through the master half of the pseudo terminal. Anything written on the master device is given to the slave as an input and anything written on the slave device is presented as an input on the master-side.
``Pseudo-tty subsystem architecture'' illustrates the architecture of the STREAMS-based pseudo-terminal subsystem. The master driver called ptm is accessed through the clone driver (see clone(7)) and is the controlling part of the system. The slave driver called pts works with the ldterm module and the hardware emulation module to provide a terminal interface to the user process. An optional packetizing module called pckt is also provided. It can be pushed on the master-side to support packet mode.