]> git.ipfire.org Git - thirdparty/man-pages.git/blobdiff - man7/pty.7
Start of man-pages-5.02: updating .Announce and .lsm files
[thirdparty/man-pages.git] / man7 / pty.7
index 1668591a91c62a9dcf08a846fc13ddf180dcd198..d221c41a7195e6f15ad0453e067f25e817bf22f7 100644 (file)
@@ -1,6 +1,6 @@
 .\" Copyright (C) 2005 Michael Kerrisk <mtk.manpages@gmail.com>
 .\"
-.\" %%%LICENSE_START(verbatim)
+.\" %%%LICENSE_START(VERBATIM)
 .\" Permission is granted to make and distribute verbatim copies of this
 .\" manual provided the copyright notice and this permission notice are
 .\" preserved on all copies.
@@ -22,7 +22,7 @@
 .\" 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
@@ -50,17 +50,27 @@ pseudoterminal can be read by the process that is connected to
 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
@@ -85,7 +95,7 @@ the name returned by
 .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
@@ -107,8 +117,8 @@ names of the form
 (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,
@@ -122,24 +132,25 @@ each pseudoterminal master until an open succeeds.
 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
@@ -150,11 +161,11 @@ and
 .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)