mirror of
https://github.com/X11Libre/xf86-input-evdev.git
synced 2026-04-14 11:44:16 +00:00
Set pInfo->fd to -1 on DEVICE_CLOSE
This allows the reopen logic to kick in later. DEVICE_CLOSE gets called on regen, so without this we'd keep a stale file descriptor in pInfo->fd in subsequent sessions. Debian bug#496101 (http://bugs.debian.org/496101) (cherry picked from commit b0b6399023bcdbb3337027f85c8da42d8b18c983)
This commit is contained in:
committed by
Peter Hutterer
parent
91e30bb07c
commit
8c332a8367
@@ -986,8 +986,10 @@ EvdevProc(DeviceIntPtr device, int what)
|
||||
|
||||
case DEVICE_CLOSE:
|
||||
xf86Msg(X_INFO, "%s: Close\n", pInfo->name);
|
||||
if (pInfo->fd != -1)
|
||||
if (pInfo->fd != -1) {
|
||||
close(pInfo->fd);
|
||||
pInfo->fd = -1;
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user