It looks like the best way to do this is to make a different
tty_driver struct for every pty. I'm not sure what major/minor to give
them...I was thinking I could probably just make all of them 5,0 (/dev/tty),
but this would cause ps to see 5,0 as the tty device in /proc/<pid>/stat so
it would list all processes on dptys as being run on /dev/tty...not the most
useful solution. I was also considering possibly not adding the tty_driver
structs to the actual tty_driver linked list. All the tables would be
dynamically allocated with the tty_driver struct and would be created with
only one entry.
I was just wondering if anyone had any comments, suggestions, etc.,
before I go implementing (I haven't done much deep kernel hacking in the
past and the whole tty layout is just now beginning to somewhat make a
little sense).
FYI, this idea is not my own but was suggested to me by Alan Cox (I
think...it's been a while).
Greg Alexander - also <gralexan@indiana.edu> - http://sietch.home.ml.org/
----
"People are very flexible and learn to adjust to strange
surroundings -- they can become accustomed to read Lisp and
Fortran programs, for example."
-- Leon Sterling and Ehud Shapiro, Art of Prolog, MIT Press
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu