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:reply-to:to:subject:message-id :references:mime-version:content-type:in-reply-to; q=dns; s= default; b=oymdrIeZhyfok8XLCJljeEzEnpuQ3GKAKU7rrF3Sh/73Mz3PdLDDR fUDd3F3zLM3AnVzicGnI+hUuN+neLyT0R4iAGoSwp6cCZeG6pGnA8jM8qqoqNlA3 CDrppG/G2oBUrBstDECZna+vaXlqOWZP0HGX43aOXTJ+eIVFgZxyJw= 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:reply-to:to:subject:message-id :references:mime-version:content-type:in-reply-to; s=default; bh=/l78hqLfXpOyzscVbUrgmTWl/4c=; b=be4w0U1Tmb7B0dIbw2Zd9mzzht38 c+24ExHm4njpFLCXMPPofPQaxIvgzHXsvJOFKaOGU2uZWUDYW7WFuVkcuGD4dYj0 5Wgihb0AlAUQV29ENybbYKgXJ7TMuYX6+m/zvrimGLh963PRO9MLt7N7UVk2JvLy pRR6OS6Tz6z/au4= 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=-1.6 required=5.0 tests=BAYES_00,FREEMAIL_ENVFROM_END_DIGIT,FREEMAIL_FROM,RCVD_IN_DNSWL_NONE,SPF_PASS autolearn=no version=3.3.2 spammy=Hx-languages-length:939, H*F:D*yahoo.com, yahoocom, yahoo.com X-HELO: sonic303-23.consmr.mail.gq1.yahoo.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s2048; t=1551027453; bh=Bg7+yX/VyAm1aI12RVgC/p4xqjIQj0fD5AgSuzpEZ2Q=; h=Date:From:To:Subject:References:In-Reply-To:From:Subject; b=sXa4pehM9S/MOPopjIV1WahiXmIamidJOeAgVYlvjHynkOEIbXuIo961yreNwSnvcmLPVTn3ShEHAldj/efYvH1am3Ll6a4/3rmQpkURuNTGoBC4qvmYfRFg+gXRl5bE6BcEOd/LUAPbiorJ5OK9TYFyqycYXTsqrwtet4Cm8t11ySLQJNyrUPDWsJuxgf0lzrbM9gKHTK9NnwgJFkzQJXOGO8O5P52RsvxKKhwUgJ64F9bVMkyrdstsxIODQ3MppryPHAPfziT41G6yo/HU7WZecDjUPiIPv99ngV0uTyyaWN1hqXySuGYBKsiNBKEkXkxvvWS7r6bYf88GPZcrBA== Date: Sun, 24 Feb 2019 08:57:26 -0800 From: "Mike Gran via cygwin" Reply-To: Mike Gran To: cygwin AT cygwin DOT com Subject: Re: return value of getitimer after an alarm Message-ID: <20190224165726.GA8095@joshua.dnsalias.com> References: <20190224065837 DOT GA14582 AT joshua DOT dnsalias DOT com> <20190224091858 DOT GD4133 AT calimero DOT vinschen DOT de> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20190224091858.GD4133@calimero.vinschen.de> User-Agent: Mutt/1.10.1 (2018-07-13) X-IsSubscribed: yes On Sun, Feb 24, 2019 at 10:18:58AM +0100, Corinna Vinschen wrote: > On Feb 23 22:58, Mike Gran via cygwin wrote: > > Hi- > > > > There is an unusual behaviour with setitimer/getitimer and I'm not > > sure if it is a bug or not. > > > > 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 = 0, tv_usec = 0}, but, in > > fact, it_value is the negative of the unix timestamp. > > > > 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. Works for me. Thanks for your help. -Mike Gran -- Problem reports: http://cygwin.com/problems.html FAQ: http://cygwin.com/faq/ Documentation: http://cygwin.com/docs.html Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple