Accepting request 57731 from home:vuntz:branches:X11:XOrg

reviewed ok.

OBS-URL: https://build.opensuse.org/request/show/57731
OBS-URL: https://build.opensuse.org/package/show/X11:XOrg/xorg-x11-server?expand=0&rev=324
This commit is contained in:
Stefan Dirsch 2011-01-10 16:32:00 +00:00 committed by Git OBS Bridge
parent 149fcde06a
commit e54b7c7a87
3 changed files with 42 additions and 0 deletions

View File

@ -0,0 +1,34 @@
From a6b9e8f1e5d5d0b3b0f121a6f677eeca7aab1950 Mon Sep 17 00:00:00 2001
From: Adam Jackson <ajax@redhat.com>
Date: Wed, 25 Aug 2010 15:06:38 +0000
Subject: linux: Fix CPU usage bug in console fd flushing
If the vt gets a vhangup from under us, then the tty will appear ready
in select(), but trying to tcflush() it will return -EIO, so we'll spin
around at 100% CPU for no reason. Notice this condition and unregister
the handler if it happens.
Signed-off-by: Adam Jackson <ajax@redhat.com>
Reviewed-by: Mikhail Gusarov <dottedmag@dottedmag.net>
Reviewed-by: Julien Cristau <jcristau@debian.org>
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
---
diff --git a/hw/xfree86/os-support/linux/lnx_init.c b/hw/xfree86/os-support/linux/lnx_init.c
index bf61ceb..7ee9046 100644
--- a/hw/xfree86/os-support/linux/lnx_init.c
+++ b/hw/xfree86/os-support/linux/lnx_init.c
@@ -85,7 +85,11 @@ static void *console_handler;
static void
drain_console(int fd, void *closure)
{
- tcflush(fd, TCIOFLUSH);
+ errno = 0;
+ if (tcflush(fd, TCIOFLUSH) == -1 && errno == EIO) {
+ xf86RemoveGeneralHandler(console_handler);
+ console_handler = NULL;
+ }
}
void
--
cgit v0.8.3-6-g21f6

View File

@ -1,3 +1,9 @@
-------------------------------------------------------------------
Mon Jan 10 16:01:13 CET 2011 - vuntz@opensuse.org
- Add xorg-server-stop-cpu-eating.diff to avoid eating 100% of the
CPU when auto-detecting which vt to use on startup.
-------------------------------------------------------------------
Wed Jan 5 20:56:44 CET 2011 - jeffm@suse.de

View File

@ -122,6 +122,7 @@ Patch221: commit-5c6a2f9.diff
Patch222: sync-fix.patch
Patch223: use-last-screen.patch
Patch224: pad-size-of-system-memory-copy-for-1x1-pixmaps
Patch225: xorg-server-stop-cpu-eating.diff
%if %moblin
Patch300: moblin-use_preferred_mode_for_all_outputs.diff
%endif
@ -254,6 +255,7 @@ popd
%patch222 -p1
%patch223 -p1
%patch224 -p1
%patch225 -p1
%if %moblin
%patch300 -p1
%endif