From d6756e0298e660a0aca58d75bcf79471ce07a634 Mon Sep 17 00:00:00 2001 From: Keith Packard Date: Mon, 9 Jul 2012 16:33:11 -0700 Subject: [PATCH] xfree86: In InitOutput, only call OsReleaseSIGIO if OsBlockSIGIO was called Otherwise, OsReleaseSIGIO will complain, or perhaps something worse will happen (if SIGIO actually needs to be blocked here). Signed-off-by: Keith Packard --- hw/xfree86/common/xf86Init.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/hw/xfree86/common/xf86Init.c b/hw/xfree86/common/xf86Init.c index 058d09f56..9c31d828d 100644 --- a/hw/xfree86/common/xf86Init.c +++ b/hw/xfree86/common/xf86Init.c @@ -401,6 +401,7 @@ InitOutput(ScreenInfo * pScreenInfo, int argc, char **argv) MessageType pix24From = X_DEFAULT; Bool pix24Fail = FALSE; Bool autoconfig = FALSE; + Bool sigio_blocked = FALSE; GDevPtr configured_device; xf86Initialising = TRUE; @@ -819,6 +820,7 @@ InitOutput(ScreenInfo * pScreenInfo, int argc, char **argv) #endif xf86AccessEnter(); OsBlockSIGIO(); + sigio_blocked = TRUE; } } @@ -924,7 +926,8 @@ InitOutput(ScreenInfo * pScreenInfo, int argc, char **argv) AttachUnboundGPU(xf86Screens[0]->pScreen, xf86GPUScreens[i]->pScreen); xf86VGAarbiterWrapFunctions(); - OsReleaseSIGIO(); + if (sigio_blocked) + OsReleaseSIGIO(); xf86InitOrigins();