What I was thinking about was to maybe skip the notion that all pty's are
available in /dev at all, and take the plunge to a real "open_pty()"
functionality (I don't remember the name of the interface that allocates a
new master pty - but we can certainly avoid the horror of walking through
all pty's one at a time until we find a non-busy one). Our current
pty-opening strategy is the original (fairly broken) BSD one, and just
about everybody else has moved on to another way of finding a pty to open.
Having zillions of pty's in devfs is not something I'd like to see.
Linus