Re: XFree86 uses up virtual terminals

Andries.Brouwer@cwi.nl
Thu, 14 Mar 1996 13:11:43 +0100


: AB> Try to also make /dev/tty1[0-9] and watch what X does. It will
: AB> cycle.

: Okay, but how?

I suppose you didnt mean it like this, but you make /dev/tty1* by

for i in 0 1 2 3 4 5 6 7 8 9; do mknod /dev/tty1$i c 4 1$i; done

: Where's the state information that tells it "you used
: tty7 last, so now use tty9"??

X uses the ioctl VT_OPENQRY, that returns the first virtual console
i for which VT_IS_IN_USE(i) is not true. Here VT_IS_IN_USE is defined as

#define VT_IS_IN_USE(i) \
(console_driver.table[i] && console_driver.table[i]->count)

Thus, either the serial driver still thinks that someone is using
that console or there is a bug in the bookkeeping of tty->count.

Andries