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 | |
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')
-rw-r--r-- | winsup/cygwin/release/2.11.0 | 3 | ||||
-rw-r--r-- | winsup/cygwin/signal.cc | 2 |
2 files changed, 5 insertions, 0 deletions
diff --git a/winsup/cygwin/release/2.11.0 b/winsup/cygwin/release/2.11.0 index 9e73e0a..85cf8b2 100644 --- a/winsup/cygwin/release/2.11.0 +++ b/winsup/cygwin/release/2.11.0 @@ -44,3 +44,6 @@ Bug Fixes - Handle a non-standard return value from some tape drives to report a "no-media" error. Addresses: https://cygwin.com/ml/cygwin/2018-06/msg00245.html + +- Fix duration handling in sigtimedwait + Addresses: https://cygwin.com/ml/cygwin-patches/2018-q3/msg00018.html 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); |