summaryrefslogtreecommitdiffstats
path: root/Modules/timemodule.c
diff options
context:
space:
mode:
authorVictor Stinner <victor.stinner@gmail.com>2015-03-30 19:33:51 (GMT)
committerVictor Stinner <victor.stinner@gmail.com>2015-03-30 19:33:51 (GMT)
commit6aa446cf039f9533a5ecf2400bf060db4313a417 (patch)
tree2530c77e76dce1b8fce38980ae24a6a9d7ed50b3 /Modules/timemodule.c
parentf70e1ca0fc30426d12aa8fc6684764ee11a66777 (diff)
downloadcpython-6aa446cf039f9533a5ecf2400bf060db4313a417.zip
cpython-6aa446cf039f9533a5ecf2400bf060db4313a417.tar.gz
cpython-6aa446cf039f9533a5ecf2400bf060db4313a417.tar.bz2
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 74c544a..5f6290d 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);