aboutsummaryrefslogtreecommitdiffstats
path: root/man7/pty.7
diff options
authorMichael Kerrisk <mtk.manpages@gmail.com>2020-07-28 22:12:08 +0200
committerMichael Kerrisk <mtk.manpages@gmail.com>2020-07-29 11:19:07 +0200
commit5e3bcef1ae44ef6789f61e000f67a2214fd07582 (patch)
tree4310e56b1bf31dc311e7ba30e4f89e5e0125ca6a /man7/pty.7
parentb38481347944c76617d0bc144649457901898cc7 (diff)
downloadman-pages-pty_lang_fixup.tar.gz
ioctl_tty.2, poll.2, getpt.3, grantpt.3, openpty.3, posix_openpt.3, ptsname.3, ttyname.3, unlockpt.3, pts.4, pty.7: Eliminate problematic "master-slave" terminologypty_lang_fixup
The "master-slave" terminology used in describing pseudoterminals is problematic, and not even very technically descriptive. Rewrite various manual pages to eliminate that language. The following replacement terms are used: slave ==> "terminal device" (or "terminal end of the pseudoterminal device pair") master ==> "pseudoterminal device" (or "pseudoterminal end of the pseudoterminal device pair") pseudoterminal (device) ==> "pseudoterminal device pair" Another notable wording change is the use of phrasings such as "the corresponding terminal device", when emphasizing the linkage between the pseudoterminal and terminal ends of a pseudoterminal device pair. The terminology originates in golang (which made a similar terminology change in 2019), and was suggested for Linux man-pages by Elliot Hughes. Reported-by: Elliott Hughes <enh@google.com> Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
Diffstat (limited to 'man7/pty.7')
-rw-r--r--man7/pty.765
1 files changed, 34 insertions, 31 deletions
diff --git a/man7/pty.7 b/man7/pty.7
index ecc1a6bec6..e8b6c95391 100644
--- a/man7/pty.7
+++ b/man7/pty.7
@@ -26,36 +26,39 @@
.SH NAME
pty \- pseudoterminal interfaces
.SH DESCRIPTION
-A pseudoterminal (sometimes abbreviated "pty")
+A pseudoterminal (sometimes abbreviated "pty") device pair
is a pair of virtual character devices that
provide a bidirectional communication channel.
One end of the channel is called the
-.IR master ;
+.IR "pseudoterminal device" ;
the other end is called the
-.IR slave .
+.IR "terminal device" .
.PP
-The slave end of the pseudoterminal provides an interface
+The terminal end of the device pair provides an interface
that behaves exactly like a classical terminal.
-A process that expects to be connected to a terminal,
-can open the slave end of a pseudoterminal and
-then be driven by a program that has opened the master end.
-Anything that is written on the master end is provided to the process
-on the slave end as though it was input typed on a terminal.
+A process that expects to be connected to a terminal
+can open the terminal end of a pseudoterminal device pair and
+then be driven by a program that has opened the pseudoterminal end
+of the device pair.
+Anything that is written on the pseudoterminal end is provided to the process
+on the terminal end as though it was input typed on a terminal.
For example, writing the interrupt character (usually control-C)
-to the master device would cause an interrupt signal
+to the pseudoterminal end of the device pair would cause an interrupt signal
.RB ( SIGINT )
to be generated for the foreground process group
-that is connected to the slave.
-Conversely, anything that is written to the slave end of the
-pseudoterminal can be read by the process that is connected to
-the master end.
+that is connected to the terminal end.
+Conversely, anything that is written to the terminal end of the
+device pair can be read by the process that is connected to
+the pseudoterminal end.
.PP
-Data flow between master and slave is handled asynchronously,
+Data flow between the two ends of the device pair is handled asynchronously,
much like data flow with a physical terminal.
-Data written to the slave will be available at the master promptly,
+Data written to the terminal end will be available at
+the pseudoterminal end 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.
+a write to the pseudoterminal end,
+and the effect being visible at the terminal end.
.PP
Historically, two pseudoterminal APIs have evolved: BSD and System V.
SUSv1 standardized a pseudoterminal API based on the System V API,
@@ -75,18 +78,18 @@ option.
that option is disabled by default in the mainline kernel.)
UNIX 98 pseudoterminals should be used in new applications.
.SS UNIX 98 pseudoterminals
-An unused UNIX 98 pseudoterminal master is opened by calling
+An unused UNIX 98 pseudoterminal device is opened by calling
.BR posix_openpt (3).
-(This function opens the master clone device,
+(This function opens the pseudoterminal multiplexor device,
.IR /dev/ptmx ;
see
.BR pts (4).)
After performing any program-specific initializations,
-changing the ownership and permissions of the slave device using
+changing the ownership and permissions of the terminal device using
.BR grantpt (3),
-and unlocking the slave using
+and unlocking the terminal using
.BR unlockpt (3)),
-the corresponding slave device can be opened by passing
+the corresponding terminal device can be opened by passing
the name returned by
.BR ptsname (3)
in a call to
@@ -110,9 +113,9 @@ For further details on these two files, see
BSD-style pseudoterminals are provided as precreated pairs, with
names of the form
.I /dev/ptyXY
-(master) and
+(pseudoterminal) and
.I /dev/ttyXY
-(slave),
+(corresponding terminal),
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
@@ -124,22 +127,22 @@ and
constitute a BSD pseudoterminal pair.
A process finds an unused pseudoterminal pair by trying to
.BR open (2)
-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.
+each pseudoterminal device until an open succeeds.
+The corresponding terminal device (substitute "tty"
+for "pty" in the name of the pseudoterminal device) can then be opened.
.SH FILES
.TP
.I /dev/ptmx
-UNIX 98 master clone device
+UNIX 98 pseudoterminal multiplexor device
.TP
.I /dev/pts/*
-UNIX 98 slave devices
+UNIX 98 terminal devices
.TP
.I /dev/pty[p\-za\-e][0\-9a\-f]
-BSD master devices
+The BSD pseudoterminal devices
.TP
.I /dev/tty[p\-za\-e][0\-9a\-f]
-BSD slave devices
+The corresponding BSD terminal devices
.SH NOTES
Pseudoterminals are used by applications such as network login services
.RB ( ssh "(1), " rlogin "(1), " telnet (1)),