[PATCH] fix duration handling in sigtimedwait

Corinna Vinschen corinna-cygwin@cygwin.com
Thu Jul 19 11:19:00 GMT 2018


On Jul 19 02:35, Mark Geisert wrote:
> ---
>  winsup/cygwin/signal.cc | 2 ++
>  1 file changed, 2 insertions(+)
> 
> diff --git a/winsup/cygwin/signal.cc b/winsup/cygwin/signal.cc
> index e581d28da..de3e88697 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);
> -- 
> 2.17.0

Pushed.


Thanks,
Corinna

-- 
Corinna Vinschen                  Please, send mails regarding Cygwin to
Cygwin Maintainer                 cygwin AT cygwin DOT com
Red Hat
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: not available
URL: <http://cygwin.com/pipermail/cygwin-patches/attachments/20180719/50ad4fdf/attachment.sig>


More information about the Cygwin-patches mailing list