2006-12-11 21:22:32 +00:00
|
|
|
--- xorg-server-1.1.1/hw/xfree86/os-support/linux/lnx_init.c.vt-activate 2006-07-05 14:31:41.000000000 -0400
|
2006-12-18 21:18:01 +00:00
|
|
|
+++ xorg-server-1.1.1/hw/xfree86/os-support/linux/lnx_init.c 2006-12-14 22:00:25.000000000 -0500
|
2006-12-11 21:22:32 +00:00
|
|
|
@@ -248,14 +248,20 @@
|
2006-09-28 16:38:24 +00:00
|
|
|
#endif
|
|
|
|
/*
|
|
|
|
* now get the VT
|
|
|
|
+ *
|
|
|
|
+ * There's a race here, in that if someone else does a VT_ACTIVATE
|
|
|
|
+ * between our ACTIVATE/WAITACTIVE, we might never get the VT.
|
2006-12-11 21:22:32 +00:00
|
|
|
+ * So we have to fail in that case. There's really no fixing this,
|
2006-09-28 16:38:24 +00:00
|
|
|
+ * it's a racy protocol.
|
|
|
|
*/
|
2006-12-11 21:22:32 +00:00
|
|
|
if (ioctl(xf86Info.consoleFd, VT_ACTIVATE, xf86Info.vtno) < 0)
|
2006-09-28 16:38:24 +00:00
|
|
|
- xf86Msg(X_WARNING, "xf86OpenConsole: VT_ACTIVATE failed: %s\n",
|
|
|
|
- strerror(errno));
|
2006-12-11 21:22:32 +00:00
|
|
|
+ FatalError("xf86OpenConsole: VT_ACTIVATE failed: %s\n",
|
|
|
|
+ strerror(errno));
|
|
|
|
+
|
2006-09-28 16:38:24 +00:00
|
|
|
|
2006-12-11 21:22:32 +00:00
|
|
|
if (ioctl(xf86Info.consoleFd, VT_WAITACTIVE, xf86Info.vtno) < 0)
|
2006-09-28 16:38:24 +00:00
|
|
|
- xf86Msg(X_WARNING, "xf86OpenConsole: VT_WAITACTIVE failed: %s\n",
|
|
|
|
- strerror(errno));
|
2006-12-11 21:22:32 +00:00
|
|
|
+ FatalError("xf86OpenConsole: VT_WAITACTIVE failed: %s\n",
|
|
|
|
+ strerror(errno));
|
2006-09-28 16:38:24 +00:00
|
|
|
|
|
|
|
if (ioctl(xf86Info.consoleFd, VT_GETMODE, &VT) < 0)
|
|
|
|
FatalError("xf86OpenConsole: VT_GETMODE failed %s\n",
|
2006-12-18 21:18:01 +00:00
|
|
|
@@ -352,6 +358,9 @@
|
|
|
|
if (ioctl(xf86Info.consoleFd, VT_ACTIVATE, activeVT) < 0)
|
|
|
|
xf86Msg(X_WARNING, "xf86CloseConsole: VT_ACTIVATE failed: %s\n",
|
|
|
|
strerror(errno));
|
|
|
|
+ if (ioctl(xf86Info.consoleFd, VT_WAITACTIVE, activeVT) < 0)
|
|
|
|
+ xf86Msg(X_WARNING, "xf86CloseConsole: VT_WAITACTIVE failed: %s\n",
|
|
|
|
+ strerror(errno));
|
|
|
|
activeVT = -1;
|
|
|
|
}
|
|
|
|
|