grantpt.3: Tell a more nuanced story about what grantpt() does or does not do

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
This commit is contained in:
Michael Kerrisk 2017-03-23 10:33:40 +01:00
parent 1848bcfbce
commit 6dcadb9beb
1 changed files with 10 additions and 1 deletions

View File

@ -71,9 +71,18 @@ POSIX.1-2001, POSIX.1-2008.
.SH NOTES
This is part of the UNIX 98 pseudoterminal support, see
.BR pts (4).
Many systems implement this function via a set-user-ID helper binary
called "pt_chown".
With Linux devpts no such helper binary is required.
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
.RB ( posix_openpt (3)),
so that nothing must be done by
.BR grantpt ().
Thus, no such helper binary is required
(and indeed it is configured to be absent during the
glibc build that is typical on many systems).
.SH SEE ALSO
.BR open (2),
.BR posix_openpt (3),