Print this page
14249 pseudo-terminal nomenclature should reflect POSIX
Change-Id: Ib4a3cef899ff4c71b09cb0dc6878863c5e8357bc
Split |
Close |
Expand all |
Collapse all |
--- old/usr/src/man/man3c/grantpt.3c.man.txt
+++ new/usr/src/man/man3c/grantpt.3c.man.txt
1 1 GRANTPT(3C) Standard C Library Functions GRANTPT(3C)
2 2
3 3 NAME
4 - grantpt - grant access to the slave pseudo-terminal device
4 + grantpt - grant access to the subsidiary device of a pseudo-terminal
5 5
6 6 SYNOPSIS
7 - #include <stdlib.h>
7 + #include <stdlib.h>
8 8
9 - int grantpt(int fildes);
9 + int
10 + grantpt(int fildes);
10 11
11 -
12 12 DESCRIPTION
13 - The grantpt() function changes the mode and ownership of the slave
14 - pseudo-terminal device associated with its master pseudo-terminal
15 - counterpart. fildes is the file descriptor returned from a successful
16 - open of the master pseudo-terminal device. The user ID of the slave is
17 - set to the real UID of the calling process and the group ID is set to a
18 - reserved group. The permission mode of the slave pseudo-terminal is set
19 - to readable and writable by the owner and writable by the group.
13 + The grantpt() function changes the mode and ownership of the pseudo-
14 + terminal subsidiary device associated with its pseudo-terminal manager
15 + counterpart.
20 16
21 -RETURN VALUES
22 - Upon successful completion, grantpt() returns 0. Otherwise, it returns
23 - -1 and sets errno to indicate the error.
17 + The fildes argument is the file descriptor returned from a successful
18 + open(2) of the pseudo-terminal manager device; e.g., by calling
19 + posix_openpt(3C) or by performing an open(2) of the ptm(7D) device.
24 20
25 -ERRORS
26 - The grantpt() function may fail if:
21 + The user ID owner of the subsidiary device is set to the real user ID of
22 + the calling process. The group ID owner is set to a reserved group.
27 23
28 - EBADF
29 - The fildes argument is not a valid open file descriptor.
24 + The permission mode of the subsidiary device is set to be readable and
25 + writable by the owner, and writable by the group.
30 26
27 +RETURN VALUES
28 + The grantpt() function returns the value 0 if successful; otherwise the
29 + value -1 is returned and the global variable errno is set to indicate the
30 + error.
31 31
32 - EINVAL
33 - The fildes argument is not associated with a master pseudo-
34 - terminal device.
32 +EXAMPLES
33 + See posix_openpt(3C) for an example that includes a call to grantpt().
35 34
35 +ERRORS
36 + The grantpt() function may fail if:
36 37
37 - EACCES
38 - The corresponding slave pseudo-terminal device could not be
39 - accessed.
38 + EBADF The fildes argument is not a valid open file
39 + descriptor.
40 40
41 + EINVAL The fildes argument is not associated with a pseudo-
42 + terminal manager device.
41 43
42 -ATTRIBUTES
43 - See attributes(5) for descriptions of the following attributes:
44 + EACCES The corresponding pseudo-terminal subsidiary device
45 + could not be accessed.
44 46
47 +INTERFACE STABILITY
48 + Committed
45 49
50 +MT LEVEL
51 + Safe
46 52
47 -
48 - +--------------------+-----------------+
49 - | ATTRIBUTE TYPE | ATTRIBUTE VALUE |
50 - +--------------------+-----------------+
51 - |Interface Stability | Standard |
52 - +--------------------+-----------------+
53 - |MT-Level | Safe |
54 - +--------------------+-----------------+
55 -
56 53 SEE ALSO
57 - open(2), ptsname(3C), unlockpt(3C), attributes(5), standards(5)
54 + open(2), posix_openpt(3C), ptsname(3C), unlockpt(3C), attributes(5),
55 + standards(5), ptm(7D)
58 56
59 -
60 - STREAMS Programming Guide
61 -
62 - August 14, 2006 GRANTPT(3C)
57 +illumos February 5, 2022 illumos
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX