diff options
author | Mark Geisert <mark@maxrnd.com> | 2018-07-19 02:35:40 -0700 |
---|---|---|
committer | Corinna Vinschen <corinna@vinschen.de> | 2018-07-19 13:18:49 +0200 |
commit | 3e51cc478d25eabb253c11c2d9c9655deff25c97 (patch) | |
tree | 6b213551e266b183a3a1bd30565b43c0f0817435 /winsup/cygwin/signal.cc | |
parent | 6d7e0b337c16421a460ab0594db67bdecb377c67 (diff) | |
download | newlib-3e51cc478d25eabb253c11c2d9c9655deff25c97.zip newlib-3e51cc478d25eabb253c11c2d9c9655deff25c97.tar.gz newlib-3e51cc478d25eabb253c11c2d9c9655deff25c97.tar.bz2 |
fix duration handling in sigtimedwait
Diffstat (limited to 'winsup/cygwin/signal.cc')
-rw-r--r-- | winsup/cygwin/signal.cc | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/winsup/cygwin/signal.cc b/winsup/cygwin/signal.cc index e581d28..de3e886 100644 --- a/winsup/cygwin/signal.cc +++ b/winsup/cygwin/signal.cc @@ -640,6 +640,8 @@ sigtimedwait (const sigset_t *set, siginfo_t *info, const timespec *timeout) waittime.QuadPart = (LONGLONG) timeout->tv_sec * NS100PERSEC + ((LONGLONG) timeout->tv_nsec + (NSPERSEC/NS100PERSEC) - 1) / (NSPERSEC/NS100PERSEC); + /* negate waittime to code as duration for NtSetTimer() below cygwait() */ + waittime.QuadPart = -waittime.QuadPart; } return sigwait_common (set, info, timeout ? &waittime : cw_infinite); |