X-Recipient: archive-cygwin AT delorie DOT com DomainKey-Signature: a=rsa-sha1; c=nofws; d=sourceware.org; h=list-id :list-unsubscribe:list-subscribe:list-archive:list-post :list-help:sender:date:from:to:cc:subject:message-id:reply-to :references:mime-version:content-type:in-reply-to; q=dns; s= default; b=Ys9ghSa7ByaZmkJplQI7kE25tdVbPGZg+Papz7y9OgCNLaIt5s2oW xQIjahVHpDQtJrdJph6lgRHZ6HMvL1rCCuW4chITKv6vLzlz8xc554MjR0XJUl2u ov/C58XaJEPC8OAdnPu4/d2Z4vr4zT4OY+90iPMnYO2kapewtboeDc= DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=sourceware.org; h=list-id :list-unsubscribe:list-subscribe:list-archive:list-post :list-help:sender:date:from:to:cc:subject:message-id:reply-to :references:mime-version:content-type:in-reply-to; s=default; bh=5Pbvh+ZFNavst4I9wjUEFQP8Txs=; b=aIuQukZR925rJzM3wEABh5xNcDFv cEbF6JSD6c5wkTDOYqWldAKXjISkGRyaWk/fq40/r4aTEmXUe0YvefUB5NQIcEcc lcxljWoHrbn6DHPiQ0asQNleYNYGgefTFtb5Zy9vsNLdDraCnyLPOD2HlB7Vipp0 vfcU02s4qqRFADM= Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner AT cygwin DOT com Mail-Followup-To: cygwin AT cygwin DOT com Delivered-To: mailing list cygwin AT cygwin DOT com 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 Date: Sun, 24 Feb 2019 10:18:58 +0100 From: Corinna Vinschen To: Mike Gran Cc: cygwin AT cygwin DOT com Subject: Re: return value of getitimer after an alarm Message-ID: <20190224091858.GD4133@calimero.vinschen.de> Reply-To: cygwin AT cygwin DOT com Mail-Followup-To: Mike Gran , cygwin AT cygwin DOT com References: <20190224065837 DOT GA14582 AT joshua DOT dnsalias DOT 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) --Ycz6tD7Th1CMF4v7 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable 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" -----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--