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 <keithp@keithp.com>
This commit is contained in:
Keith Packard 2012-07-09 16:33:11 -07:00
parent ea8b04507e
commit d6756e0298

View File

@ -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();