*** UNIX MANUAL PAGE BROWSER ***

A Nergahak database for man pages research.

Navigation

Directory Browser

1Browse 4.4BSD4.4BSD
1Browse Digital UNIXDigital UNIX 4.0e
1Browse FreeBSDFreeBSD 14.3
1Browse MINIXMINIX 3.4.0rc6-d5e4fc0
1Browse NetBSDNetBSD 10.1
1Browse OpenBSDOpenBSD 7.7
1Browse UNIX v7Version 7 UNIX
1Browse UNIX v10Version 10 UNIX

Manual Page Search

Manual Page Result

0 Command: pty | Section: 7 | Source: Digital UNIX | File: pty.7.gz
pty(7) Miscellaneous Information Manual pty(7) NAME pty - Pseudo terminal driver SYNOPSIS pseudo-device pty [count ] options RPTY DESCRIPTION The pty driver provides support for a device-pair termed a pseudo ter- minal. A pseudo terminal is a pair of character devices, a master de- vice and a slave device. The slave device provides an interface iden- tical to that described in the tty(7) reference page. However, whereas all other devices which provide the interface described in the tty ref- erence page have a hardware device behind them, the slave device has, instead, another process manipulating it through the master half of the pseudo terminal. That is, anything written on the master device is given to the slave device as input and anything written on the slave device is presented as input on the master device. The DIGITAL UNIX operating system supports a STREAMS-based and clist- based implementation of the pty subsystem. The default configuration uses STREAMS-based ptys. STREAMS-based ptys use the options RPTY line in the kernel configuration file, while clist-based ptys use the pseudo-device, pty. By default, 32 pseudo-terminal special device files are created. Note that you cannot have both types of ptys configured at the same time. To enhance compatibility, STREAMS-based ptys offers two master pseudo terminal drivers, the BSD compatible master and the System V compatible master. The BSD master is a non-STREAMS device which interfaces to the STREAMS-based slave pty. The System V master is a STREAMS-based device which also interfaces to the STREAMS-based slave pty. The BSD master is opened through the cloning device, /dev/ptmx_bsd, and through the master pty special files, /dev/ptyXX. The System V master is opened only through the cloning device /dev/ptmx. Currently the BSD master cloning device is used by the libc routine openpty(3). You should allocate ptys by using the openpty(3) function, which hides the pty name space that will change in the next major operating system release. The following ioctl calls apply only to pseudo terminals: Returns the dev_t of the master file descriptor. ISPTM is valid only on the master half of the pseudo terminal, and takes no arguments. Stops output to a terminal (for example, like entering <ctrl-S>). Takes no parameter. Restarts output (stopped by TIOCSTOP or by typing <ctrl-S>). Takes no parameter. Enable or disable packet mode. Packet mode is enabled by specifying (by reference) a nonzero parameter and disabled by specify- ing (by reference) a zero parameter. When applied to the master side of a pseudo terminal, each subsequent read() from the terminal will re- turn data written on the slave part of the pseudo terminal preceded by a zero byte (symbolically defined as TIOCPKT_DATA), or a single byte reflecting control status information. In the latter case, the byte is an inclusive-OR of zero or more of the bits: Whenever the read queue for the terminal is flushed. Whenever the write queue for the terminal is flushed. Whenever output to the terminal is stopped by <ctrl-S>. Whenever output to the terminal is restarted. Whenever t_stopc is <ctrl-S> and t_startc is <ctrl-Q>. Whenever the start and stop charac- ters are not <ctrl-S> and <ctrl-Q>. While this mode is in use, the presence of control status infor- mation to be read from the master side may be detected by a se- lect() for exceptional conditions. This mode is used by the rlogin and rlogind commands to imple- ment a remote-echoed, locally <ctrl-S>/<ctrl-Q> flow-controlled remote login with proper back-flushing of output; it can be used by other similar programs. Enable or disable a mode that allows a small number of simple user ioctl commands to be passed through the pseudo-terminal, using a protocol similar to that of TIOCPKT. The TIOCUCNTL and TIOCPKT modes are mutually exclu- sive. This mode is enabled from the master side of a pseudo terminal by specifying (by reference) a nonzero parameter and disabled by specifying (by reference) a zero parameter. Each subsequent read() from the master side will return data written on the slave part of the pseudo terminal preceded by a zero byte, or a single byte reflecting a user control operation on the slave side. A user control command consists of a special ioctl operation with no data; the command is given as UIOC- CMD(n), where n is a number in the range 1-255. The operation value n will be received as a single byte on the next read() from the master side. The ioctl UIOCCMD(0) is a no-op that may be used to probe for the existence of this facility. As with TIOCPKT mode, command operations may be detected with a select() for exceptional conditions. A mode for the master half of a pseudo terminal, independent of TIOCPKT. This mode causes input to the pseudo terminal to be flow controlled and not input edited (regardless of the terminal mode). Each write to the control terminal produces a record boundary for the process reading the terminal. In normal usage, a write of data is like the data typed as a line on the terminal; a write of 0 (zero) bytes is like typing an End-of-File character. The TIOCREMOTE mode can be used when doing remote line editing in a window man- ager, or whenever flow controlled input is required. Allows the open of the corresponding slave to succeed when using the System V master. If UNLKPT is not used in conjunction with the System V master the open of the corresponding slave will fail with EPERM. This ioctl takes no arguments. FILES Master pseudo terminals Slave pseudo terminals System V master cloning device BSD master cloning device SVR4 slave pseudo terminal RELATED INFORMATION openpty(3) System Administration delim off pty(7)

Navigation Options