]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
In floatsleep(), when using select(), ignore EINTR error.
authorGuido van Rossum <guido@python.org>
Thu, 19 Aug 1999 14:40:27 +0000 (14:40 +0000)
committerGuido van Rossum <guido@python.org>
Thu, 19 Aug 1999 14:40:27 +0000 (14:40 +0000)
Modules/timemodule.c

index aa4cc444999f6df545748411c86ab65a37a21ded..a2d0a47afdd8430f3ad80a85144a03db99606944 100644 (file)
@@ -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__ */