From 1c37be80982151a5acd74fe4b960695f604f22ca Mon Sep 17 00:00:00 2001 From: Michael Witrant Date: Tue, 1 Sep 2009 10:46:50 +1000 Subject: [PATCH] XFree86: Linux: Fix 100% CPU usage with ShareVTs and kbd Leave consoleFd open over the course of the server, even though any use of it in this context is likely to be disastrous. Signed-off-by: Michael Witrant Reviewed-by: Daniel Stone --- hw/xfree86/os-support/linux/lnx_init.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/hw/xfree86/os-support/linux/lnx_init.c b/hw/xfree86/os-support/linux/lnx_init.c index 64030072f..5a6db8081 100644 --- a/hw/xfree86/os-support/linux/lnx_init.c +++ b/hw/xfree86/os-support/linux/lnx_init.c @@ -286,9 +286,6 @@ xf86OpenConsole(void) /* we really should have a InitOSInputDevices() function instead * of Init?$#*&Device(). So I just place it here */ - - } else { /* ShareVTs */ - close(xf86Info.consoleFd); } } else { /* serverGeneration != 1 */ if (!ShareVTs && VTSwitch) @@ -317,7 +314,10 @@ xf86CloseConsole(void) int vtno = -1; #endif - if (ShareVTs) return; + if (ShareVTs) { + close(xf86Info.consoleFd); + return; + } if (console_handler) { xf86RemoveGeneralHandler(console_handler);