[PATCH 09/21] [terminal] drop next_active_vt

Scott James Remnant scott at ubuntu.com
Thu Mar 18 12:54:53 PDT 2010


On Thu, 2010-03-18 at 15:02 -0400, Ray Strode wrote:

> I was pretty sure you have to call VT_WAITACTIVE after VT_ACTIVATE for
> internal kernel bookkeeping reasons.  I have some vague notion of
> someone (Alan Cox?) telling me that at some point.  Looking though, I
> can't find any evidence that I'm right.
> 
> In fact, it seems there's a new VT_WAITEVENT interface that directly
> conflicts with the idea that VT_WAITACTIVE is mandatory.  So i'm going
> to say i'm wrong.
> 
As far as I can tell, even X doesn't call VT_WAITACTIVE

You need it if you call VT_ACTIVATE and then expect to be on the VT you
activated, since that ioctl() returns immediately and doesn't block.
There are reasons you might need that, synchronous code for example; or
if you need to use one of the silly ioctl()s that require that the VT be
the foreground one (font and keymap settings, etc.)

If you have the VT you're going to activate in VT_PROCESS mode though,
you get a signal when you enter, so that's just a good a way of knowing
that you're on the VT - indeed better because you're then not blocking
on the VT you're leaving being in VT_PROCESS and waiting for something
else.

So yeah, in summary, this is better and I'm pretty sure it's valid (it
certainly works :p)

Scott
-- 
Scott James Remnant
scott at ubuntu.com
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 198 bytes
Desc: This is a digitally signed message part
URL: <http://lists.freedesktop.org/archives/plymouth/attachments/20100318/c20c7b57/attachment.pgp>


More information about the plymouth mailing list