AB> Try to also make /dev/tty1[0-9] and watch what X does. It will
AB> cycle.
KS> Okay, but how?
AB> I suppose you didnt mean it like this, but you make /dev/tty1* by
AB> for i in 0 1 2 3 4 5 6 7 8 9; do mknod /dev/tty1$i c 4 1$i; done
*laugh* Yes, I know how to do this. I meant "How does it know to cycle?"
KS> Where's the state information that tells it "you used
KS> tty7 last, so now use tty9"??
AB> X uses the ioctl VT_OPENQRY, that returns the first virtual console
AB> i for which VT_IS_IN_USE(i) is not true. Here VT_IS_IN_USE is
AB> defined as
AB> #define VT_IS_IN_USE(i) \
AB> (console_driver.table[i] && console_driver.table[i]->count)
AB> Thus, either the serial driver still thinks that someone is using
AB> that console or there is a bug in the bookkeeping of tty->count.
Hmmm... Okay, thanks.
---Kayvan
-- >>>>>>> Read about Star's Edge and Avatar at http://www.starsedge.com <<<<<<< "The trust and respect of a child is an honor to be earned, not demanded." Kayvan Sylvan | Sylvan Associates | Proud Dad of: kayvan@Sylvan.COM | http://www.isp.net/~kayvan | Katherine Yelena (8/8/89) (408) 978-1407 PGP OK | Ask me about Avatar. | Robin Gregory (2/28/92)