From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 23348 invoked by alias); 24 Feb 2019 16:57:37 -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 23335 invoked by uid 89); 24 Feb 2019 16:57:36 -0000 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 Received: from sonic303-23.consmr.mail.gq1.yahoo.com (HELO sonic303-23.consmr.mail.gq1.yahoo.com) (98.137.64.204) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Sun, 24 Feb 2019 16:57:35 +0000 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== Received: from sonic.gate.mail.ne1.yahoo.com by sonic303.consmr.mail.gq1.yahoo.com with HTTP; Sun, 24 Feb 2019 16:57:33 +0000 Received: from 75-54-112-187.lightspeed.irvnca.sbcglobal.net (EHLO joshua.dnsalias.com) ([75.54.112.187]) by smtp428.mail.gq1.yahoo.com (Oath Hermes SMTP Server) with ESMTPA ID 64d0853baa432dfd78879f9147a4f0aa for ; Sun, 24 Feb 2019 16:57:32 +0000 (UTC) Date: Sun, 24 Feb 2019 17:27:00 -0000 From: "Mike Gran via cygwin" Reply-To: Mike Gran To: cygwin@cygwin.com Subject: Re: return value of getitimer after an alarm Message-ID: <20190224165726.GA8095@joshua.dnsalias.com> References: <20190224065837.GA14582@joshua.dnsalias.com> <20190224091858.GD4133@calimero.vinschen.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 X-SW-Source: 2019-02/txt/msg00400.txt.bz2 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