From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 11135 invoked by alias); 24 Feb 2019 09:19:05 -0000 Mailing-List: contact cygwin-help@cygwin.com; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner@cygwin.com Mail-Followup-To: cygwin@cygwin.com Received: (qmail 11114 invoked by uid 89); 24 Feb 2019 09:19:05 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-100.9 required=5.0 tests=BAYES_00,GOOD_FROM_CORINNA_CYGWIN,KAM_LAZY_DOMAIN_SECURITY,RCVD_IN_DNSWL_NONE autolearn=ham version=3.3.2 spammy=gran, alarm, Gran, getitimer X-HELO: mout.kundenserver.de Received: from mout.kundenserver.de (HELO mout.kundenserver.de) (212.227.17.13) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Sun, 24 Feb 2019 09:19:04 +0000 Received: from calimero.vinschen.de ([24.134.7.25]) by mrelayeu.kundenserver.de (mreue108 [212.227.15.183]) with ESMTPSA (Nemesis) id 1N7zNt-1h20vZ3Lud-0154Bn; Sun, 24 Feb 2019 10:18:58 +0100 Received: by calimero.vinschen.de (Postfix, from userid 500) id 59073A8093B; Sun, 24 Feb 2019 10:18:58 +0100 (CET) Date: Sun, 24 Feb 2019 10:14:00 -0000 From: Corinna Vinschen To: Mike Gran Cc: cygwin@cygwin.com Subject: Re: return value of getitimer after an alarm Message-ID: <20190224091858.GD4133@calimero.vinschen.de> Reply-To: cygwin@cygwin.com Mail-Followup-To: Mike Gran , cygwin@cygwin.com References: <20190224065837.GA14582@joshua.dnsalias.com> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="Ycz6tD7Th1CMF4v7" Content-Disposition: inline In-Reply-To: <20190224065837.GA14582@joshua.dnsalias.com> User-Agent: Mutt/1.11.3 (2019-02-01) X-SW-Source: 2019-02/txt/msg00398.txt.bz2 --Ycz6tD7Th1CMF4v7 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Content-length: 813 On Feb 23 22:58, Mike Gran via cygwin wrote: > Hi- >=20 > There is an unusual behaviour with setitimer/getitimer and I'm not > sure if it is a bug or not. >=20 > Basically, if I call setitimer to set an SIGALRM, and then call > getitimer *after* the alarm goes off, I rather expect the time I > receive from getitimer should be {tv_sec =3D 0, tv_usec =3D 0}, but, in > fact, it_value is the negative of the unix timestamp. >=20 > Attached is a test case. Thanks for the testcase. The reason for the problem is this: I optimized a condition in Cygwin's POSIX timers "gettime" method. I optimized it so effecively that it was practically invisible :} I pushed a patch and uploaded new developer snapshots to https://cygwin.com/snapshots/ Please test. Thanks, Corinna --=20 Corinna Vinschen Cygwin Maintainer --Ycz6tD7Th1CMF4v7 Content-Type: application/pgp-signature; name="signature.asc" Content-length: 833 -----BEGIN PGP SIGNATURE----- iQIzBAEBCAAdFiEEoVYPmneWZnwT6kwF9TYGna5ET6AFAlxyYYIACgkQ9TYGna5E T6DMKw//VtzdeA9jFg6kan6oHfhdUJNssTFIOi+KcyI53IvSOhbd5fIxo2P3qLJm 5cVsJwXTzJNdW1g37cVNJSkT6vuOvOnVg/328XVtI7c6CKjTvMCi188vHYRToh9Y 4QJ1pAUUGauyIcnzAMb49Wgy/VsAMA+6yOLhRSjv0CnjQSYLRT8+6JLYGNVzSinX bFzxYvdb5pc/Az2PXVZg5MzTvqAULtX6EkEEc7aG7hWYMp0xX3+5iVW/MHifitUV rlhIvK22oOgYpr/9oGhDC2TIGB6vuRH7BAhqCzDgW409zMOr1eYO52EDly2OFhGS 5EOn+q7ERveca2y4k9YsJ0paY6jhDlj85SXhHrZ897b3tzPteyZoinuj96zZkFML bHKefufexrjaW2AYtm3TZQ/iaEMWYviY7XjtrFnFI0IuOV0M+KRtXUuPU4ByrCYt sNhMx2d0KIPwUwVxgbI7UcF1NBO6//DZrcucpn4jAhRGDplwVmpdjI+xBQfTuFqF YpLruJgyl9ehEeTKCgzeOG2GInw74hymV6vI8YN+aVFQiX04IXbcTruvyNa9sZOg XIua3HFHyrsJ1+JZV/ChGDnjNloQWwNYu+EjiAwn8zfM06O2h7qmgQ+zDUIcQejj QYGnYP5LQNlPUd4UvbCZqkGppLpMQWSZz+VbDu9kynyz+HcphQk= =lDO1 -----END PGP SIGNATURE----- --Ycz6tD7Th1CMF4v7--