diff options
| author | Michael Kerrisk <mtk.manpages@gmail.com> | 2020-07-28 22:12:08 +0200 |
|---|---|---|
| committer | Michael Kerrisk <mtk.manpages@gmail.com> | 2020-07-29 11:19:07 +0200 |
| commit | 5e3bcef1ae44ef6789f61e000f67a2214fd07582 (patch) | |
| tree | 4310e56b1bf31dc311e7ba30e4f89e5e0125ca6a /man2 | |
| parent | b38481347944c76617d0bc144649457901898cc7 (diff) | |
| download | man-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 'man2')
| -rw-r--r-- | man2/ioctl_tty.2 | 23 | ||||
| -rw-r--r-- | man2/poll.2 | 3 |
2 files changed, 15 insertions, 11 deletions
diff --git a/man2/ioctl_tty.2 b/man2/ioctl_tty.2 index 88ec0269ae..7f504928ec 100644 --- a/man2/ioctl_tty.2 +++ b/man2/ioctl_tty.2 @@ -220,7 +220,8 @@ Redirect output that would have gone to or .I /dev/tty0 to the given terminal. -If that was a pseudoterminal master, send it to the slave. +If that was the pseudoterminal end of a pseudoterminal device pair, +send it to the corresponding terminal device. In Linux before version 2.6.10, anybody can do this as long as the output was not redirected yet; since version 2.6.10, only a process with the @@ -283,7 +284,7 @@ Set the foreground process group ID of this terminal. Get the session ID of the given terminal. This fails with the error .B ENOTTY -if the terminal is not a master pseudoterminal +if the terminal is not the pseudoterminal end of a pseudoterminal device pair and not our controlling terminal. Strange. .SS Exclusive mode @@ -322,14 +323,15 @@ Set the line discipline of the terminal. Enable (when .RI * argp is nonzero) or disable packet mode. -Can be applied to the master side of a pseudoterminal only (and will return +Can be applied only to the pseudoterminal end of a pseudoterminal device pair +(and will return .B ENOTTY otherwise). In packet mode, each subsequent .BR read (2) will return a packet that either contains a single nonzero control byte, or has a single byte containing zero (\(aq\e0\(aq) followed by data -written on the slave side of the pseudoterminal. +written on the terminal end of the pseudoterminal device pair. If the first byte is not .B TIOCPKT_DATA (0), it is an OR of one @@ -346,7 +348,7 @@ TIOCPKT_NOSTOP The start and stop characters are not \fB^S\fP/\fB^Q\fP. .IP While packet mode is in use, the presence of control status information to be read -from the master side may be detected by a +from the pseudoterminal end of the device pair may be detected by a .BR select (2) for exceptional conditions or a .BR poll (2) @@ -371,13 +373,14 @@ Set (if .IR *argp is nonzero) or remove (if .IR *argp -is zero) the lock on the pseudoterminal slave device. +is zero) the lock on the terminal end of a pseudoterminal device pair. (See also .BR unlockpt (3).) .TP .BI "TIOCGPTLCK int *" argp (since Linux 3.8) -Place the current lock state of the pseudoterminal slave device +Place the current lock state of the terminal end of +a pseudoterminal device pair in the location pointed to by .IR argp . .TP @@ -386,14 +389,14 @@ in the location pointed to by (since Linux 4.13) Given a file descriptor in .I fd -that refers to a pseudoterminal master, +that refers to the pseudoterminal end of a pseudoterminal device pair, open (with the given .BR open (2)-style .IR flags ) and return a new file descriptor that refers to the peer -pseudoterminal slave device. +terminal device. This operation can be performed -regardless of whether the pathname of the slave device +regardless of whether the pathname of the terminal device is accessible through the calling process's mount namespace. .IP Security-conscious programs interacting with namespaces may wish to use this diff --git a/man2/poll.2 b/man2/poll.2 index 940c51da52..b4428e9f6d 100644 --- a/man2/poll.2 +++ b/man2/poll.2 @@ -172,7 +172,8 @@ Possibilities include: There is out-of-band data on a TCP socket (see .BR tcp (7)). .IP \(bu -A pseudoterminal master in packet mode has seen a state change on the slave +A pseudoterminal device in packet mode has seen a state change on +the corresponding terminal device (see .BR ioctl_tty (2)). .IP \(bu |
