.\" the source, must acknowledge the copyright and authors of this work.
.\" %%%LICENSE_END
.\"
-.TH PTY 7 2005-10-10 "Linux" "Linux Programmer's Manual"
+.TH PTY 7 2017-09-15 "Linux" "Linux Programmer's Manual"
.SH NAME
pty \- pseudoterminal interfaces
.SH DESCRIPTION
the master end.
Pseudoterminals are used by applications such as network login services
.RB ( ssh "(1), " rlogin "(1), " telnet (1)),
-terminal emulators,
+terminal emulators such as
+.BR xterm (1),
.BR script (1),
.BR screen (1),
+.BR tmux (1),
+.BR unbuffer (1),
and
.BR expect (1).
-
+.PP
Data flow between master and slave is handled asynchronously,
much like data flow with a physical terminal.
Data written to the slave will be available at the master promptly,
but may not be available immediately.
Similarly, there may be a small processing delay between
a write to the master, and the effect being visible at the slave.
-
+.PP
Historically, two pseudoterminal APIs have evolved: BSD and System V.
SUSv1 standardized a pseudoterminal API based on the System V API,
and this API should be employed in all new programs that use
pseudoterminals.
-
+.PP
Linux provides both BSD-style and (standardized) System V-style
pseudoterminals.
System V-style terminals are commonly called UNIX 98 pseudoterminals
.BR ptsname (3)
in a call to
.BR open (2).
-
+.PP
The Linux kernel imposes a limit on the number of available
UNIX 98 pseudoterminals.
In kernels up to and including 2.6.3, this limit is configured
(master) and
.I /dev/ttyXY
(slave),
-where X is a letter from the 16-character set [p-za-e],
-and Y is a letter from the 16-character set [0-9a-f].
+where X is a letter from the 16-character set [p\-za\-e],
+and Y is a letter from the 16-character set [0\-9a\-f].
(The precise range of letters in these two sets varies across UNIX
implementations.)
For example,
The corresponding pseudoterminal slave (substitute "tty"
for "pty" in the name of the master) can then be opened.
.SH FILES
+.TP
.I /dev/ptmx
-(UNIX 98 master clone device)
-.br
+UNIX 98 master clone device
+.TP
.I /dev/pts/*
-(UNIX 98 slave devices)
-.br
-.I /dev/pty[p-za-e][0-9a-f]
-(BSD master devices)
-.br
-.I /dev/tty[p-za-e][0-9a-f]
-(BSD slave devices)
+UNIX 98 slave devices
+.TP
+.I /dev/pty[p\-za\-e][0\-9a\-f]
+BSD master devices
+.TP
+.I /dev/tty[p\-za\-e][0\-9a\-f]
+BSD slave devices
.SH NOTES
A description of the
.B TIOCPKT
.BR ioctl (2),
which controls packet mode operation, can be found in
-.BR tty_ioctl (4).
-
+.BR ioctl_tty (2).
+.PP
The BSD
.BR ioctl (2)
operations
.BR TIOCREMOTE
have not been implemented under Linux.
.SH SEE ALSO
+.BR ioctl_tty (2),
.BR select (2),
.BR setsid (2),
.BR forkpty (3),
.BR openpty (3),
.BR termios (3),
.BR pts (4),
-.BR tty (4),
-.BR tty_ioctl (4)
+.BR tty (4)