This chapter describes the use of the pseudoterminal
driver (FTDRIVER) and the pseudoterminal software.
A pseudoterminal is a software device that appears
as a real terminal to an application communicating with it, but does
not require the existence of a physical terminal. A pseudoterminal
consists of two components: the pseudoterminal device and a control
program. The control program acts like a keyboard; that is, anything
written to the control program appears on the pseudoterminal device
as if the keystrokes had been typed in at a physical terminal. The
control program also acts like a viewport to the pseudoterminal device;
that is, the control program reads anything that is written by the
system to the pseudoterminal device.
A pseudoterminal allows an application to be set
up on the control side of the link to communicate with another application
that is on the pseudoterminal side. This arrangement allows development
of applications that either simulate users or monitor the communication
between a real user (at a physical terminal) and an application. As
with other devices, the work of the pseudoterminal is performed by
a device driver and is tightly coupled to the operating system.
The pseudoterminal driver software includes a
set of control connection routines. Applications can use these routines
to perform pseudoterminal operations and functions. Appendix D provides the calling conventions
for these routines.