diff options
author | Victor Stinner <victor.stinner@gmail.com> | 2014-02-17 00:02:43 +0100 |
---|---|---|
committer | Victor Stinner <victor.stinner@gmail.com> | 2014-02-17 00:02:43 +0100 |
commit | 3c1b379ebd701cbd7686d0f0be95b88c5b3da8fe (patch) | |
tree | c1759ff720c8226c333052f6773c97d5b5c6356e /Modules/signalmodule.c | |
parent | 23f628de4ab75acde14de9593793e67ec74d851c (diff) | |
download | cpython-git-3c1b379ebd701cbd7686d0f0be95b88c5b3da8fe.tar.gz |
Issue #20320: select.select() and select.kqueue.control() now round the timeout
aways from zero, instead of rounding towards zero.
It should make test_asyncio more reliable, especially test_timeout_rounding() test.
Diffstat (limited to 'Modules/signalmodule.c')
-rw-r--r-- | Modules/signalmodule.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/Modules/signalmodule.c b/Modules/signalmodule.c index 43e3ca1f2d..fedaddff35 100644 --- a/Modules/signalmodule.c +++ b/Modules/signalmodule.c @@ -799,7 +799,8 @@ signal_sigtimedwait(PyObject *self, PyObject *args) &signals, &timeout)) return NULL; - if (_PyTime_ObjectToTimespec(timeout, &tv_sec, &tv_nsec) == -1) + if (_PyTime_ObjectToTimespec(timeout, &tv_sec, &tv_nsec, + _PyTime_ROUND_DOWN) == -1) return NULL; buf.tv_sec = tv_sec; buf.tv_nsec = tv_nsec; |