xserver/hw
Tomáš Trnka 82445286d5 Fix drain_console unregistration
Bug introduced by 9dca441670
xfree86: add a hook to replace the new console handler.

console_handler was not being set, making the server eat up CPU spinning
in WaitForSomething selecting consoleFd over and over again, every time
trying to unregister drain_console without success due to
console_handler being NULL.

Let's just fix the unregistration in xf86SetConsoleHandler() and use that.

But wait, there could be a catch: If some driver replaced the handler using
xf86SetConsoleHandler(), the unregistration in xf86CloseConsole will unregister
that one. I don't understand Xorg well enough to know whether this poses a
problem (could mess up driver deinit somehow or something like that). As it is,
xf86SetConsoleHandler() doesn't offer any way to prevent this (i.e. check which
handler is currently registered).

I had been using it for two days on my machine that previously hit 100% CPU
several times a day. That has now gone away without any new problems appearing.

Signed-off-by: Tomas Trnka <tomastrnka@gmx.com>
Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
(cherry picked from commit 323869f329)
2011-10-24 16:36:06 -07:00
..
dmx Terminate the log with one last message. 2011-07-27 09:31:02 +10:00
kdrive Xephyr/dri: register screen and window privates on init 2011-08-09 13:51:21 -07:00
vfb Terminate the log with one last message. 2011-07-27 09:31:02 +10:00
xfree86 Fix drain_console unregistration 2011-10-24 16:36:06 -07:00
xnest Terminate the log with one last message. 2011-07-27 09:31:02 +10:00
xquartz XQuartz: pbproxy: Add missing AM_OBJCFLAGS 2011-10-09 01:36:11 -07:00
xwin Merge remote-tracking branch 'whot/for-keith' 2011-07-29 14:58:58 -07:00
Makefile.am Catch errors in recursive relink targets 2010-03-22 00:45:57 -05:00