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.
This commit is contained in:
parent
ff9929ed48
commit
41c3069f7c
|
@ -510,12 +510,14 @@ static void
|
||||||
xf86SigioReadInput(int fd,
|
xf86SigioReadInput(int fd,
|
||||||
void *closure)
|
void *closure)
|
||||||
{
|
{
|
||||||
|
int errno_save = errno;
|
||||||
int sigstate = xf86BlockSIGIO();
|
int sigstate = xf86BlockSIGIO();
|
||||||
InputInfoPtr pInfo = (InputInfoPtr) closure;
|
InputInfoPtr pInfo = (InputInfoPtr) closure;
|
||||||
|
|
||||||
pInfo->read_input(pInfo);
|
pInfo->read_input(pInfo);
|
||||||
|
|
||||||
xf86UnblockSIGIO(sigstate);
|
xf86UnblockSIGIO(sigstate);
|
||||||
|
errno = errno_save;
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
|
Loading…
Reference in New Issue
Block a user