mirror of
https://gitlab.freedesktop.org/xorg/xserver.git
synced 2025-12-24 17:10:05 +01:00
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.
(cherry picked from commit 41c3069f7c)
This commit is contained in:
parent
ad05d5d035
commit
ab80b27250
1 changed files with 2 additions and 0 deletions
|
|
@ -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;
|
||||
}
|
||||
|
||||
/*
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue