summaryrefslogtreecommitdiff
path: root/Modules/timemodule.c
diff options
context:
space:
mode:
authorVictor Stinner <victor.stinner@gmail.com>2015-03-30 21:33:51 +0200
committerVictor Stinner <victor.stinner@gmail.com>2015-03-30 21:33:51 +0200
commitcf0fb0f2acffc375fdffbc4a50e608cad322c0a2 (patch)
treeef4c1df1891d16a93f6fe59688c411bb42e1899e /Modules/timemodule.c
parent595196798f69de72353da4f376a800a766bc082a (diff)
downloadcpython-cf0fb0f2acffc375fdffbc4a50e608cad322c0a2.tar.gz
PEP 475: on EINTR, retry the function even if the timeout is equals to zero
Retry: * signal.sigtimedwait() * threading.Lock.acquire() * threading.RLock.acquire() * time.sleep()
Diffstat (limited to 'Modules/timemodule.c')
-rw-r--r--Modules/timemodule.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/Modules/timemodule.c b/Modules/timemodule.c
index 74c544a62d..5f6290d98f 100644
--- a/Modules/timemodule.c
+++ b/Modules/timemodule.c
@@ -1455,7 +1455,7 @@ pysleep(_PyTime_t secs)
monotonic = _PyTime_GetMonotonicClock();
secs = deadline - monotonic;
- if (secs <= 00)
+ if (secs < 0)
break;
/* retry with the recomputed delay */
} while (1);