From: Guido van Rossum Date: Thu, 19 Aug 1999 14:40:27 +0000 (+0000) Subject: In floatsleep(), when using select(), ignore EINTR error. X-Git-Tag: v1.6a1~1000 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=a5456d5042b3ac8d3b190fbdb6c67138607abfab;p=thirdparty%2FPython%2Fcpython.git In floatsleep(), when using select(), ignore EINTR error. --- diff --git a/Modules/timemodule.c b/Modules/timemodule.c index aa4cc444999f..a2d0a47afdd8 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__ */