mirror of
https://github.com/python/cpython.git
synced 2025-12-23 09:19:18 +00:00
In floatsleep(), when using select(), ignore EINTR error.
This commit is contained in:
parent
1ebcf6aabb
commit
a5456d5042
1 changed files with 4 additions and 2 deletions
|
|
@ -751,8 +751,10 @@ floatsleep(double secs)
|
|||
Py_BEGIN_ALLOW_THREADS
|
||||
if (select(0, (fd_set *)0, (fd_set *)0, (fd_set *)0, &t) != 0) {
|
||||
Py_BLOCK_THREADS
|
||||
PyErr_SetFromErrno(PyExc_IOError);
|
||||
return -1;
|
||||
if (errno != EINTR) {
|
||||
PyErr_SetFromErrno(PyExc_IOError);
|
||||
return -1;
|
||||
}
|
||||
}
|
||||
Py_END_ALLOW_THREADS
|
||||
#else /* !HAVE_SELECT || __BEOS__ */
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue