Streams based systems open a stream clone device which then hands them on
the next free "pty". There then tends to be all sorts of "magic" to get
the pty's probable name for use with things like write.
There are very good reasons however pty's should be handed out by a daemon
which keeps its own pty allocation maps. For one it means unused tty/pty
pairs will be owned by root and chowned by a root owned process without
needing the requester to be setuid, for the second it can update the utmp.
We can't do this in 2.0.x however as AF_UNIX sockets behave like BSD and
don't have credential information giving the uid/gid of the source reliably.
> Having zillions of pty's in devfs is not something I'd like to see.
We still need zillions of tty sides for write for ttyname() and for vast
numbers of other legacy uses.
Alan