Do I understand this correctly: PTY master is a /dev/ttyXY file, and slave
is /dev/ptyXY. A process goes through /dev/ptya0 to /dev/ptyzf (for example)
and finds a free tty/pty pair.
You want the process to open /dev/ptyAF (AlwaysFree ;)) and /dev/ttyAF, and
an user-space daemon routes these to /dev/ttyXY and /dev/ptyXY? Assuming
that I understood things at least nearly correctly, this doesn't make sense.
Why not simply have two devices, /dev/ptyAF and /dev/ttyAF, and kernel would
dynamically create "struct pty" and "struct tty" thingies or whatever its
internal representations be when these devices are opened? What's the point
in trying to do that user-space mapping? :/ This way we would even get rid
of the problem with insufficient minor numbers for pty:s :)
-- We all know Linux is great...it does infinite loops in 5 seconds. -- Linus Torvalds