preserve errno around the SIGIO handler
This commit is contained in:
parent
0a81d47638
commit
19c7e9da55
|
@ -101,6 +101,7 @@ xf86SIGIO (int sig)
|
||||||
int i;
|
int i;
|
||||||
fd_set ready;
|
fd_set ready;
|
||||||
struct timeval to;
|
struct timeval to;
|
||||||
|
int save_errno = errno; /* do not clobber the global errno */
|
||||||
int r;
|
int r;
|
||||||
|
|
||||||
ready = xf86SigIOMask;
|
ready = xf86SigIOMask;
|
||||||
|
@ -117,6 +118,8 @@ xf86SIGIO (int sig)
|
||||||
if (r > 0) {
|
if (r > 0) {
|
||||||
xf86Msg(X_ERROR, "SIGIO %d descriptors not handled\n", r);
|
xf86Msg(X_ERROR, "SIGIO %d descriptors not handled\n", r);
|
||||||
}
|
}
|
||||||
|
/* restore global errno */
|
||||||
|
errno = save_errno;
|
||||||
}
|
}
|
||||||
|
|
||||||
static int
|
static int
|
||||||
|
|
Loading…
Reference in New Issue
Block a user