From 74372fd0049676787904f1f9f80f836b97f5f60e Mon Sep 17 00:00:00 2001 From: Peter Hutterer Date: Thu, 22 May 2008 18:02:10 +0930 Subject: [PATCH] xfree86: suspend signals while removing a device. Getting a keyboard event while halfway through freeing memory can be unpleasant. --- hw/xfree86/common/xf86Xinput.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/hw/xfree86/common/xf86Xinput.c b/hw/xfree86/common/xf86Xinput.c index e53756fc2..996162402 100644 --- a/hw/xfree86/common/xf86Xinput.c +++ b/hw/xfree86/common/xf86Xinput.c @@ -475,6 +475,7 @@ DeleteInputDeviceRequest(DeviceIntPtr pDev) drv = pInfo->drv; idev = pInfo->conf_idev; } + OsBlockSignals(); RemoveDevice(pDev); if (pDev->isMaster) @@ -484,6 +485,7 @@ DeleteInputDeviceRequest(DeviceIntPtr pDev) drv->UnInit(drv, pInfo, 0); else xf86DeleteInput(pInfo, 0); + OsReleaseSignals(); /* devices added through HAL aren't in the config layout */ it = xf86ConfigLayout.inputs;