In floatsleep(), when using select(), ignore EINTR error.
This commit is contained in:
parent
1ebcf6aabb
commit
a5456d5042
|
@ -751,9 +751,11 @@ floatsleep(double secs)
|
||||||
Py_BEGIN_ALLOW_THREADS
|
Py_BEGIN_ALLOW_THREADS
|
||||||
if (select(0, (fd_set *)0, (fd_set *)0, (fd_set *)0, &t) != 0) {
|
if (select(0, (fd_set *)0, (fd_set *)0, (fd_set *)0, &t) != 0) {
|
||||||
Py_BLOCK_THREADS
|
Py_BLOCK_THREADS
|
||||||
|
if (errno != EINTR) {
|
||||||
PyErr_SetFromErrno(PyExc_IOError);
|
PyErr_SetFromErrno(PyExc_IOError);
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
Py_END_ALLOW_THREADS
|
Py_END_ALLOW_THREADS
|
||||||
#else /* !HAVE_SELECT || __BEOS__ */
|
#else /* !HAVE_SELECT || __BEOS__ */
|
||||||
#ifdef macintosh
|
#ifdef macintosh
|
||||||
|
|
Loading…
Reference in New Issue