[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Console switching ioctls

From: Marco Gerards
Subject: Console switching ioctls
Date: Thu, 25 Aug 2005 16:31:08 +0200
User-agent: Gnus/5.1007 (Gnus v5.10.7) Emacs/21.3 (gnu/linux)


To be able to switch from X (and svgalib, etc) to the console and back
we need support for some ioctls.  I wonder if we want to have such
ioctls or do we want a special library (libvt or so).

There are several ioctls related for console switching.  The most
important one is VT_ACTIVATE which is easy to implement.  But it is
not the only ioctl we need.  Another one is VT_SETSTATE.  This ioctl
is used to set the state for a specific tty.

Our problem is that the ttys (/dev/tty1 for example) are not
responsible for the state, all these things are under control of the
console client.  One thing we can do is making nodes for each VT
(/dev/cons/[1-6] or whatever is required).  These nodes can be used to
access the console client (and the VT_* ioctls).  The problem with
this approach is that the access is not via the responsible tty.  So
the programs using this should be Hurd aware anyway.

A program can reserve a VT and request a notification when switching
to or away from that VT.  The notification is done with a signal.  But
I think there is no way in the Hurd to figure out where to send it to.
So how can I get the PID of the process calling VT_SETMODE?

So I am considering a library that is capable of the same things as
the ioctls.  Would that be a wise choice or is there any way to
overcome the problems I described?  My choice would be a library that
should be used for console switching, although it will make us


reply via email to

[Prev in Thread] Current Thread [Next in Thread]