]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
Our implementation of granpt(3) could be valid in the future.
authored <ed@FreeBSD.org>
Mon, 24 Aug 2009 11:16:44 +0000 (11:16 +0000)
committered <ed@FreeBSD.org>
Mon, 24 Aug 2009 11:16:44 +0000 (11:16 +0000)
commit545621430da7b1b0621760c6d4eb3d11393cdfd3
tree73f26542dc5d90edfc957e10459bca8bf480cd29
parent0c947ef6e81d77a8810fbbc14226008bd391c5c9
Our implementation of granpt(3) could be valid in the future.

When I wrote the pseudo-terminal driver for the MPSAFE TTY code, Robert
Watson and I agreed the best way to implement this, would be to let
posix_openpt() create a pseudo-terminal with proper permissions in place
and let grantpt() and unlockpt() be no-ops.

This isn't valid behaviour when looking at the spec. Because I thought
it was an elegant solution, I filed a bug report at the Austin Group
about this. In their last teleconference, they agreed on this subject.
This means that future revisions of POSIX may allow grantpt() and
unlockpt() to be no-ops if an open() on /dev/ptmx (if the implementation
has such a device) and posix_openpt() already do the right thing.

I'd rather put this in the manpage, because simply mentioning we don't
comply to any standard makes it look worse than it is. Right now we
don't, but at least we took care of it.

Approved by: re (kib)
MFC after: 3 days
lib/libc/stdlib/ptsname.3