Re: PROPOSAL: /proc/dev

Rauli Ruohonen (raulir@fishy.pp.sci.fi)
Sun, 11 Jan 1998 00:28:54 +0200


Alan Cox wrote:
>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.

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