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>