[ConsoleKit] Active VT tracking can fail at startup

Leen Besselink consolekit at consolejunkie.net
Thu Sep 2 11:30:04 PDT 2010


Hi again folks,

> Now it's time for some fun.
> 
> This morning I did some more testing, when it fails, it did not find any
> console_fd, it just returns 3.
> 
> Because that is the last value of fd from the loop at the end of
> ck_get_a_console_fd

I've been testing and trying to figure out what is going on with some other users
at the Ubuntu bugreport related to this.

And I can positively say, that which is mentioned above is what is going on.

At times on startup none of the checks in ck_get_a_console_fd work, it just returns 3
as a result because that is what was used in the last loop.

If however there is a loop which retries this, every so often, then it works.

Then when you have a working console_fd you can use it to call the ioctl as many times
and in as many threads you like.

What do you propose we do to fix this ?

I'm fine with doing the work, but I want to make sure when I've done the work it will
(eventually) get accepted.

My C is a bit rusty so my current code might not be what you want.

Currently it just does a for-loop with a usleep before the threads get started.

Have a nice day,
	Leen.


More information about the ConsoleKit mailing list