From 41c3069f7cf28155f8e6cfe0c10a12a1f5f76c7d Mon Sep 17 00:00:00 2001 From: Mark Vytlacil Date: Thu, 1 Nov 2007 21:05:43 +0200 Subject: [PATCH] XFree86: Input: Save/restore errno around SIGIO (bug #10683) Make sure errno is saved and restored from the SIGIO handler, so errors from system calls in input handlers don't break the interrupted code. --- hw/xfree86/common/xf86Events.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/hw/xfree86/common/xf86Events.c b/hw/xfree86/common/xf86Events.c index 785815c6a..e88fc3b3e 100644 --- a/hw/xfree86/common/xf86Events.c +++ b/hw/xfree86/common/xf86Events.c @@ -510,12 +510,14 @@ static void xf86SigioReadInput(int fd, void *closure) { + int errno_save = errno; int sigstate = xf86BlockSIGIO(); InputInfoPtr pInfo = (InputInfoPtr) closure; pInfo->read_input(pInfo); xf86UnblockSIGIO(sigstate); + errno = errno_save; } /*