diff options
Diffstat (limited to 'Modules/signalmodule.c')
-rw-r--r-- | Modules/signalmodule.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/Modules/signalmodule.c b/Modules/signalmodule.c index 41acbfa..0cc7237 100644 --- a/Modules/signalmodule.c +++ b/Modules/signalmodule.c @@ -784,14 +784,18 @@ signal_sigtimedwait(PyObject *self, PyObject *args) struct timespec buf; sigset_t set; siginfo_t si; + time_t tv_sec; + long tv_nsec; int err; if (!PyArg_ParseTuple(args, "OO:sigtimedwait", &signals, &timeout)) return NULL; - if (_PyTime_ObjectToTimespec(timeout, &buf.tv_sec, &buf.tv_nsec) == -1) + if (_PyTime_ObjectToTimespec(timeout, &tv_sec, &tv_nsec) == -1) return NULL; + buf.tv_sec = tv_sec; + buf.tv_nsec = tv_nsec; if (buf.tv_sec < 0 || buf.tv_nsec < 0) { PyErr_SetString(PyExc_ValueError, "timeout must be non-negative"); |