]> git.ipfire.org Git - thirdparty/man-pages.git/commit
grantpt.3: It's a no-op on modern glibc and other UNIXes; HISTORYise
authorнаб <nabijaczleweli@nabijaczleweli.xyz>
Mon, 17 Jul 2023 23:31:17 +0000 (01:31 +0200)
committerAlejandro Colomar <alx@kernel.org>
Tue, 18 Jul 2023 11:33:57 +0000 (13:33 +0200)
commit114ed1505678640c456533d8e2b4436a52afc7f4
treecf74ccf52a99c358f01d68e94c82a228fdae6bdf
parent7f19730b07068ba871da501f498f06d26530882a
grantpt.3: It's a no-op on modern glibc and other UNIXes; HISTORYise

FreeBSD, OpenBSD, and Linux (/dev/ptmx) do all intialisation in open(2),
and grantpt(3) is a no-op (that checks whether the fd is a pty, except
on musl).

The illumos gate and NetBSD do a ioctl (and, indeed, illumos-gate commit
 facf4a8d7b59fde89a8662b4f4c73a758e6c402c ("PSARC/2003/246 Filesystem
  Driven Device Naming"), which kills pt_chmod, notes that it's been
 "6464196 bfu should remove pt_chmod, obsoleted by /dev filesystem").

glibc 2.33 completely kills BSD PTY support on Linux
(Debian hasn't configured with them on any architecture since 2007:
   https://bugs.debian.org/338404
 and even earlier on some arches; they're really just trivia under
 Linux ‒ this may be better served stuffed into HISTORY as an explainer
 for the SIGCHLD thing, since regardless of the "version", the behaviour
 is well-defined and consistent).

There really aren't many cohesive "versions" of this ‒ indeed, so long
as grantpt(3) exists it behaves precisely as described here ‒
inasmuch as different systems, historically, had different ptys,
and thus different implementations.  These are all but trivia.

Cc: Jakub Wilk <jwilk@jwilk.net>
Signed-off-by: Ahelenia Ziemiańska <nabijaczleweli@nabijaczleweli.xyz>
Signed-off-by: Alejandro Colomar <alx@kernel.org>
man3/grantpt.3