|
|
1.1 root 1: .TH PTY 4 "7 July 1983"
2: .UC 4
3: .SH NAME
4: pty \- pseudo terminal driver
5: .SH SYNOPSIS
6: .B pseudo-device pty
7: .SH DESCRIPTION
8: The
9: .I pty
10: driver provides support for a device-pair termed a
11: .IR "pseudo terminal" .
12: A pseudo terminal is a pair of character devices, a
13: .I master
14: device and a
15: .I slave
16: device. The slave device provides processes
17: an interface identical
18: to that described in
19: .IR tty (4).
20: However, whereas all other devices which provide the
21: interface described in
22: .IR tty (4)
23: have a hardware device of some sort behind them, the slave
24: device has, instead, another process manipulating
25: it through the master half of the pseudo terminal.
26: That is, anything written on the master device is
27: given to the slave device as input and anything written
28: on the slave device is presented as input on the master
29: device.
30: .PP
31: In configuring, if no optional ``count'' is given in
32: the specification, 16 pseudo terminal pairs are configured.
33: .PP
34: The following
35: .I ioctl
36: calls apply only to pseudo terminals:
37: .TP
38: TIOCSTOP
39: Stops output to a terminal (e.g. like typing ^S). Takes
40: no parameter.
41: .TP
42: TIOCSTART
43: Restarts output (stopped by TIOCSTOP or by typing ^S).
44: Takes no parameter.
45: .TP
46: TIOCPKT
47: Enable/disable
48: .I packet
49: mode. Packet mode is enabled by specifying (by reference)
50: a nonzero parameter and disabled by specifying (by reference)
51: a zero parameter. When applied to the master side of a pseudo
52: terminal, each subsequent
53: .I read
54: from the terminal will return data written on the slave part of
55: the pseudo terminal preceded by a zero byte (symbolically
56: defined as TIOCPKT_DATA), or a single byte reflecting control
57: status information. In the latter case, the byte is an inclusive-or
58: of zero or more of the bits:
59: .RS
60: .TP
61: TIOCPKT_FLUSHREAD
62: whenever the read queue for the terminal is flushed.
63: .TP
64: TIOCPKT_FLUSHWRITE
65: whenever the write queue for the terminal is flushed.
66: .TP
67: TIOCPKT_STOP
68: whenever output to the terminal is stopped a la ^S.
69: .TP
70: TIOCPKT_START
71: whenever output to the terminal is restarted.
72: .TP
73: TIOCPKT_DOSTOP
74: whenever
75: .I t_stopc
76: is ^S
77: and
78: .I t_startc
79: is ^Q.
80: .TP
81: TIOCPKT_NOSTOP
82: whenever the start and stop characters are not ^S/^Q.
83: .RE
84: .IP
85: This mode is used by
86: .IR rlogin (1C)
87: and
88: .IR rlogind (8C)
89: to implement a remote-echoed, locally ^S/^Q flow-controlled
90: remote login with proper back-flushing of output; it can be
91: used by other similar programs.
92: .TP
93: TIOCREMOTE
94: A mode for the master half of a pseudo terminal, independent
95: of TIOCPKT. This mode causes input to the pseudo terminal
96: to be flow controlled and not input edited (regardless of the
97: terminal mode). Each write to the control terminal produces
98: a record boundary for the process reading the terminal. In
99: normal usage, a write of data is like the data typed as a line
100: on the terminal; a write of 0 bytes is like typing an end-of-file
101: character. TIOCREMOTE can be used when doing remote line
102: editing in a window manager, or whenever flow controlled input
103: is required.
104: .SH FILES
105: .DT
106: /dev/pty[p-r][0-9a-f] master pseudo terminals
107: .br
108: /dev/tty[p-r][0-9a-f] slave pseudo terminals
109: .SH DIAGNOSTICS
110: None.
111: .SH BUGS
112: It is not possible to send an EOT.
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.