From a5456d5042b3ac8d3b190fbdb6c67138607abfab Mon Sep 17 00:00:00 2001 From: Guido van Rossum Date: Thu, 19 Aug 1999 14:40:27 +0000 Subject: In floatsleep(), when using select(), ignore EINTR error. --- Modules/timemodule.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/Modules/timemodule.c b/Modules/timemodule.c index aa4cc44..a2d0a47 100644 --- a/Modules/timemodule.c +++ b/Modules/timemodule.c @@ -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__ */ -- cgit v0.12