Re: [PATCH] xfree86: always enable SIGIO on OsVendorInit (#50957)

2012-06-15 Thread Keith Packard
Peter Hutterer peter.hutte...@who-t.net writes:

 An alternative change would be to add this to os/osinit.c but iirc the
 xfree86 ddx is the only one that actually needs SIGIO, right?

Oh. Ick. OsBlockSignals and xf86BlockSIGIO both mess with
sigprocmask. Surely that can't be a good thing.

(Note that kdrive *also* has sigprocmask calls (not that we really
care about kdrive anymore).)

Seems like we should create an OsBlockSIGIO function and have it
cooperate with OsBlockSignals, then call that from both xf86 and kdrive.

-- 
keith.pack...@intel.com


pgpSn9NtFi7R4.pgp
Description: PGP signature
___
xorg-devel@lists.x.org: X.Org development
Archives: http://lists.x.org/archives/xorg-devel
Info: http://lists.x.org/mailman/listinfo/xorg-devel

[PATCH] xfree86: always enable SIGIO on OsVendorInit (#50957)

2012-06-14 Thread Peter Hutterer
Drivers call xf86InstallSIGIOHandler() for their fd on DEVICE_ON. That
function does not actually enable the signal if it was blocked to begin
with. As a result, if one vt-switches away from the server (SIGIO is
blocked) and then triggers a server regeneration, the signal remains
blocked and input devices are dead.

Avoid this by always unblocking SIGIO when we start the server.

X.Org Bug 50957 http://bugs.freedesktop.org/show_bug.cgi?id=50957

Signed-off-by: Peter Hutterer peter.hutte...@who-t.net
---
An alternative change would be to add this to os/osinit.c but iirc the
xfree86 ddx is the only one that actually needs SIGIO, right?

 hw/xfree86/common/xf86Init.c |1 +
 1 file changed, 1 insertion(+)

diff --git a/hw/xfree86/common/xf86Init.c b/hw/xfree86/common/xf86Init.c
index ead47cc..dba9eef 100644
--- a/hw/xfree86/common/xf86Init.c
+++ b/hw/xfree86/common/xf86Init.c
@@ -964,6 +964,7 @@ OsVendorInit(void)
 }
 #endif
 #endif
+xf86UnblockSIGIO(0);
 
 beenHere = TRUE;
 }
-- 
1.7.10.2

___
xorg-devel@lists.x.org: X.Org development
Archives: http://lists.x.org/archives/xorg-devel
Info: http://lists.x.org/mailman/listinfo/xorg-devel