Re: [PATCH] vt: extend VT_WAITACTIVE ioctl to allow waiting until a specific VT becomes inactive

From: Valdis . Kletnieks
Date: Tue Jun 30 2009 - 10:37:23 EST


On Tue, 30 Jun 2009 02:00:04 +0200, Lennart Poettering said:

> ConsoleKit would probably just call it in a loop like this:
>
> for (;;) {
> struct vt_stat st;
> ioctl(0, VT_GETSTATE, &st);
> printf("console %s is active.\n", st.v_active);
> ioctl(0, VT_WAITACTIVE, (signed long) - st.v_active);
> }

We will include a documented way for ConsoleKit and similar to be able
to determine if the kernel has this feature, right? (If older kernels
return a -EBOGUS for ioctl(0,VT_WAITACTIVE,-1) that's probably good enough)

Attachment: pgp00000.pgp
Description: PGP signature