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 /man3 | |
| 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 'man3')
| -rw-r--r-- | man3/getpt.3 | 2 | ||||
| -rw-r--r-- | man3/grantpt.3 | 17 | ||||
| -rw-r--r-- | man3/openpty.3 | 35 | ||||
| -rw-r--r-- | man3/posix_openpt.3 | 10 | ||||
| -rw-r--r-- | man3/ptsname.3 | 10 | ||||
| -rw-r--r-- | man3/ttyname.3 | 2 | ||||
| -rw-r--r-- | man3/unlockpt.3 | 11 |
7 files changed, 48 insertions, 39 deletions
diff --git a/man3/getpt.3 b/man3/getpt.3 index 89c3813a8b..65904596d9 100644 --- a/man3/getpt.3 +++ b/man3/getpt.3 @@ -6,7 +6,7 @@ .\" .TH GETPT 3 2020-02-09 "GNU" "Linux Programmer's Manual" .SH NAME -getpt \- open a new pseudoterminal master +getpt \- open a new pseudoterminal device .SH SYNOPSIS .nf .BR "#define _GNU_SOURCE" " /* See feature_test_macros(7) */" diff --git a/man3/grantpt.3 b/man3/grantpt.3 index 34c59a52b6..c09d50685a 100644 --- a/man3/grantpt.3 +++ b/man3/grantpt.3 @@ -4,7 +4,7 @@ .\" .TH GRANTPT 3 2017-09-15 "GNU" "Linux Programmer's Manual" .SH NAME -grantpt \- grant access to the slave pseudoterminal +grantpt \- grant access to the terminal device corresponding to a pseudoterminal .SH SYNOPSIS .B #include <stdlib.h> .PP @@ -30,13 +30,14 @@ Glibc 2.23 and earlier: .SH DESCRIPTION The .BR grantpt () -function changes the mode and owner of the slave pseudoterminal device -corresponding to the master pseudoterminal referred to by the file descriptor +function changes the mode and owner of the terminal device +corresponding to the pseudoterminal device referred to by the file descriptor .IR fd . -The user ID of the slave is set to the real UID of the calling process. +The user ID of the terminal device +is set to the real UID of the calling process. The group ID is set to an unspecified value (e.g., .IR tty ). -The mode of the slave is set to 0620 (crw\-\-w\-\-\-\-). +The mode of the terminal device is set to 0620 (crw\-\-w\-\-\-\-). .PP The behavior of .BR grantpt () @@ -53,7 +54,7 @@ appropriately. .SH ERRORS .TP .B EACCES -The corresponding slave pseudoterminal could not be accessed. +The corresponding terminal device could not be accessed. .TP .B EBADF The @@ -63,7 +64,7 @@ argument is not a valid open file descriptor. .B EINVAL The .I fd -argument is valid but not associated with a master pseudoterminal. +argument is valid but not associated with a pseudoterminal device. .SH VERSIONS .BR grantpt () is provided in glibc since version 2.1. @@ -90,7 +91,7 @@ Many systems implement this function via a set-user-ID helper binary called "pt_chown". On Linux systems with a devpts filesystem (present since Linux 2.2), the kernel normally sets the correct ownership and permissions -for the pseudoterminal slave when the master is opened +for the corresponding terminal device when the pseudoterminal device is opened .RB ( posix_openpt (3)), so that nothing must be done by .BR grantpt (). diff --git a/man3/openpty.3 b/man3/openpty.3 index 9d3dcc2366..8580dc9a4b 100644 --- a/man3/openpty.3 +++ b/man3/openpty.3 @@ -38,11 +38,11 @@ openpty, login_tty, forkpty \- terminal utility functions .nf .B #include <pty.h> .PP -.BI "int openpty(int *" amaster ", int *" aslave ", char *" name , +.BI "int openpty(int *" fd_pty ", int *" fd_tty ", char *" name , .BI " const struct termios *" termp , .BI " const struct winsize *" winp ); .PP -.BI "pid_t forkpty(int *" amaster ", char *" name , +.BI "pid_t forkpty(int *" fd_pty ", char *" name , .BI " const struct termios *" termp , .BI " const struct winsize *" winp ); @@ -55,23 +55,26 @@ Link with \fI\-lutil\fP. .SH DESCRIPTION The .BR openpty () -function finds an available pseudoterminal and returns file descriptors -for the master and slave in -.I amaster +function finds an available pseudoterminal device pair +and returns file descriptors +for the pseudoterminal device and the corresponding terminal device in +.I fd_pty and -.IR aslave . +.IR fd_tty . If .I name -is not NULL, the filename of the slave is returned in +is not NULL, the filename of the corresponding terminal device is returned in .IR name . If .I termp -is not NULL, the terminal parameters of the slave will be set to the +is not NULL, the terminal parameters of the corresponding terminal device +will be set to the values in .IR termp . If .I winp -is not NULL, the window size of the slave will be set to the values in +is not NULL, the window size of the corresponding terminal device +will be set to the values in .IR winp . .PP The @@ -79,7 +82,8 @@ The function prepares for a login on the terminal referred to by the file descriptor .I fd -(which may be a real terminal device, or the slave of a pseudoterminal as +(which may be a real terminal device, +or the terminal end of a pseudoterminal device pair as returned by .BR openpty ()) by creating a new session, making @@ -99,19 +103,20 @@ and .BR login_tty () to create a new process operating in a pseudoterminal. A file descriptor referring to -master side of the pseudoterminal is returned in -.IR amaster . +the pseudoterminal end of the pseudoterminal device pair +is returned in +.IR fd_pty . If .I name is not NULL, the buffer it points to is used to return the -filename of the slave. +filename of the corresponding terminal device. The .I termp and .I winp arguments, if not NULL, -will determine the terminal attributes and window size of the slave -side of the pseudoterminal. +will determine the terminal attributes and window size of the terminal end +of the pseudoterminal device pair. .SH RETURN VALUE If a call to .BR openpty (), diff --git a/man3/posix_openpt.3 b/man3/posix_openpt.3 index 6feaae03da..a932cc9f07 100644 --- a/man3/posix_openpt.3 +++ b/man3/posix_openpt.3 @@ -45,7 +45,7 @@ _XOPEN_SOURCE\ >=\ 600 .SH DESCRIPTION The .BR posix_openpt () -function opens an unused pseudoterminal master device, returning a +function opens an unused pseudoterminal device, returning a file descriptor that can be used to refer to that device. .PP The @@ -109,10 +109,12 @@ posix_openpt(int flags) .PP Calling .BR posix_openpt () -creates a pathname for the corresponding pseudoterminal slave device. -The pathname of the slave device can be obtained using +creates a pathname for the terminal device that corresponds +to the pseudoterminal. +The pathname of the terminal device can be obtained using .BR ptsname (3). -The slave device pathname exists only as long as the master device is open. +The terminal device pathname exists only as long as +the pseudoterminal device is open. .SH SEE ALSO .BR open (2), .BR getpt (3), diff --git a/man3/ptsname.3 b/man3/ptsname.3 index 5ae25c5e4b..eb3d16cac8 100644 --- a/man3/ptsname.3 +++ b/man3/ptsname.3 @@ -6,7 +6,7 @@ .\" .TH PTSNAME 3 2020-06-09 "" "Linux Programmer's Manual" .SH NAME -ptsname, ptsname_r \- get the name of the slave pseudoterminal +ptsname, ptsname_r \- get the name of the terminal corresponding to a pseudoterminal .SH SYNOPSIS .B #include <stdlib.h> .PP @@ -37,15 +37,15 @@ Glibc 2.23 and earlier: .SH DESCRIPTION The .BR ptsname () -function returns the name of the slave pseudoterminal device -corresponding to the master referred to by the file descriptor +function returns the name of the terminal device +corresponding to the pseudoterminal device referred to by the file descriptor .IR fd . .PP The .BR ptsname_r () function is the reentrant equivalent of .BR ptsname (). -It returns the name of the slave pseudoterminal device as a +It returns the name of the terminal device as a null-terminated string in the buffer pointed to by .IR buf . The @@ -79,7 +79,7 @@ glibc 2.25 and earlier.) .TP .B ENOTTY .I fd -does not refer to a pseudoterminal master device. +does not refer to a pseudoterminal device. .TP .B ERANGE .RB ( ptsname_r () diff --git a/man3/ttyname.3 b/man3/ttyname.3 index 93932610b5..cd98315227 100644 --- a/man3/ttyname.3 +++ b/man3/ttyname.3 @@ -67,7 +67,7 @@ Bad file descriptor. .\" glibc commit 15e9a4f378c8607c2ae1aa465436af4321db0e23 .B ENODEV .I fd -refers to a slave pseudoterminal device +refers to the terminal end of a pseudoterminal device pair but the corresponding pathname could not be found (see NOTES). .TP .B ENOTTY diff --git a/man3/unlockpt.3 b/man3/unlockpt.3 index 26333ef6d3..c3d67f4a2c 100644 --- a/man3/unlockpt.3 +++ b/man3/unlockpt.3 @@ -4,7 +4,7 @@ .\" .TH UNLOCKPT 3 2017-07-13 "" "Linux Programmer's Manual" .SH NAME -unlockpt \- unlock a pseudoterminal master/slave pair +unlockpt \- unlock a pseudoterminal device pair .SH SYNOPSIS .B #define _XOPEN_SOURCE .br @@ -32,12 +32,13 @@ Glibc 2.23 and earlier: .SH DESCRIPTION The .BR unlockpt () -function unlocks the slave pseudoterminal device -corresponding to the master pseudoterminal referred to by the file descriptor +function unlocks the terminal device +corresponding to the pseudoterminal device referred to by the file descriptor .IR fd . .PP .BR unlockpt () -should be called before opening the slave side of a pseudoterminal. +should be called before opening the terminal end of +a pseudoterminal device pair. .SH RETURN VALUE When successful, .BR unlockpt () @@ -55,7 +56,7 @@ argument is not a file descriptor open for writing. .B EINVAL The .I fd -argument is not associated with a master pseudoterminal. +argument is not associated with a pseudoterminal device. .SH VERSIONS .BR unlockpt () is provided in glibc since version 2.1. |
