diff -u -r linux-2.6.29-rc8/drivers/char/vt_ioctl.c patched-linux-2.6.29-rc8/drivers/char/vt_ioctl.c --- linux-2.6.29-rc8/drivers/char/vt_ioctl.c 2009-03-12 22:39:28.000000000 -0400 +++ patched-linux-2.6.29-rc8/drivers/char/vt_ioctl.c 2009-03-24 15:50:33.000000000 -0400 @@ -846,6 +846,13 @@ ret = vt_waitactive(arg - 1); break; + + case VT_WAITSWITCH: + if (!perm) + goto eperm; + ret = vt_waitactive(-1234); + break; + /* * If a vt is under process control, the kernel will not switch to it * immediately, but postpone the operation until the process calls this @@ -1202,6 +1209,11 @@ if (signal_pending(current)) break; schedule(); + + if (vt == -1234) { + retval = 0; + break; + } } remove_wait_queue(&vt_activate_queue, &wait); __set_current_state(TASK_RUNNING);