delorie.com/archives/browse.cgi | search |
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=QYFrD79s/Mc+ykgjy+QXvkYB9TWL7fbl2WqCWpI7M2nmX/aCoFHx1 | |
oN1+m/YxHzr1d4vjOwB5VmoQpi24QZ1Ua+Nlnz9HF6IPkrNy9KbmSSLAKgtVm4lh | |
Wr0Rmq546r9uQGNr4O4TGd3rz0B/nwubWv5YOeBMyo38NQw2rsFmi0= | |
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=rfEviPcr0E9CUngClJ9ZGpFoHg8=; b=B8SL11wclx0wepPlwoD7qOCY5wV8 | |
7YNOPx5ljwkcTxm8B1FETqKTfXsZHJrmX4gPu9IozsGJYfUg7UcG/AUcjwr5+CXk | |
rO4F/uemS9/Ai++2e5lSyGIn1avq6FAzsrepQ934hLf7Xum/+l/VQnKBphBNbJzS | |
CGwDGsU9jp9H8Dk= | |
Mailing-List: | contact cygwin-help AT cygwin DOT com; run by ezmlm |
List-Id: | <cygwin.cygwin.com> |
List-Subscribe: | <mailto:cygwin-subscribe AT cygwin DOT com> |
List-Archive: | <http://sourceware.org/ml/cygwin/> |
List-Post: | <mailto:cygwin AT cygwin DOT com> |
List-Help: | <mailto:cygwin-help AT cygwin DOT com>, <http://sourceware.org/ml/#faqs> |
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-Virus-Found: | No |
X-Spam-SWARE-Status: | No, score=-101.2 required=5.0 tests=AWL,BAYES_50,KAM_LAZY_DOMAIN_SECURITY,KHOP_DYNAMIC,RCVD_IN_BRBL_LASTEXT,RCVD_IN_PBL,RDNS_DYNAMIC,USER_IN_WHITELIST autolearn=no version=3.3.2 spammy=DOT, Maintainer, H*f:sk:569022F, neglected |
X-HELO: | calimero.vinschen.de |
Date: | Sat, 9 Jan 2016 15:41:31 +0100 |
From: | Corinna Vinschen <corinna-cygwin AT cygwin DOT com> |
To: | cygwin AT cygwin DOT com |
Cc: | John Hood <cgull AT glup DOT org> |
Subject: | Re: cygwin.dll: bug with select on Windows console |
Message-ID: | <20160109144131.GD16303@calimero.vinschen.de> |
Reply-To: | cygwin AT cygwin DOT com |
Mail-Followup-To: | cygwin AT cygwin DOT com, John Hood <cgull AT glup DOT org> |
References: | <5680953B DOT 8050200 AT glup DOT org> <20160107173034 DOT GE20447 AT calimero DOT vinschen DOT de> <568EABDC DOT 1050606 AT glup DOT org> <20160108162906 DOT GJ20447 AT calimero DOT vinschen DOT de> <569022FC DOT 7030004 AT glup DOT org> <20160109143620 DOT GB16303 AT calimero DOT vinschen DOT de> |
MIME-Version: | 1.0 |
In-Reply-To: | <20160109143620.GB16303@calimero.vinschen.de> |
User-Agent: | Mutt/1.5.24 (2015-08-30) |
--da4uJneut+ArUgXk Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Jan 9 15:36, Corinna Vinschen wrote: > On Jan 8 15:58, john hood wrote: > > On 1/8/16 11:29 AM, Corinna Vinschen wrote: > > > On Jan 7 13:18, John Hood wrote: > > >> Sorry about forgetting the testcase (which was good, actually, that > > >> version had a bug). I've attached it here. This takes a single > > >> argument, the timeout value for select() in microseconds. A value of > > >> 1000000 is fine for testing this issue. Type at it, or just bang on= the > > >> keyboard with random keystrokes, and it will report the results from > > >> select() and the characters read. On a Windows console, it should > > >> report an error within a few seconds. Moving the mouse cursor over = the > > >> Windows console window while typing seems to provoke the error as we= ll.=20 > > >=20 > > > No chance. I tried this for a good hour now with the unpatched Cygwin > > > DLL on 32 bit W7 and 64 bit W10 in 32 and 64 bit in a Windows console, > > > and I can't provoke this error. It just works for me. > >=20 > > My apologies for sending you down a wrong path. Try again with > > "socket-t 1000", which only waits 1ms. I don't know what I was thinking > > when I said the 1s timeout works fine. >=20 > This helped and I found the culprit. There are, in fact, two ways to > leave select with a timeout. One of them only occurs in the border > cases where a device behind a descriptor generates events which are > not supposed to generate a select event. I forgot to mention, this affects especially consoles (window events, mouse events) and /dev/windows. > If that happens, the select > loop is supposed to loop again, but the code first checks if the timeout > has been hit in the meantime and, if so, it breaks from the loop with a > timeout, aka, a return value of 0. However, in this single case, the > code neglected to zero out the descriptor arrays, which then leads to > the problem you encountered. >=20 > I fixed the code and took the opportunity to clean it up a little using > basically the (fixed) patch I proposed two days ago. >=20 > I've just uploaded new developer snapshots to https://cygwin.com/snapshot= s/ > and a new test release 2.4.0-0.17 which contain this fix. Please give any > of them a try. >=20 >=20 > Thanks, > Corinna Corinna --=20 Corinna Vinschen Please, send mails regarding Cygwin to Cygwin Maintainer cygwin AT cygwin DOT com Red Hat --da4uJneut+ArUgXk Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 iQIcBAEBCAAGBQJWkRwaAAoJEPU2Bp2uRE+gd8AP/iencimU17xCoo1YXcf9Q1YN BI6YOl5fgxLAlh9i2jpJK5v9vtk7WTQXzbnXviEKjciCOwH8Z643LWospDICl2xS txm4Zr7b70TuChCrNbPfTE3dS9TREoVa2YCmH5+v6W+Inyl5pLJCoE0TuL8hVLRC g/14KzK7nBZkJJedC4CDifuyVZdhsh88DvUqplCWhrxuuRNv2yeJ5mPb2TgBT1u9 gT2PfAMIQE1krR+7pO76xCv+eVisKs1cYpjNigVSHJEwE3xp33FV7E2aRbrWUjeS PTRmKbLF4BY3EF4g4bfjMDJBnjhQcl5lB8xJ5BGWaYLMdbs4VTNgshElAJ5hDUfT 255o0r3aMoVmzUdTkqRENZjCvkqJ55+8tjCXAaoCBLLZ1rYPZ2uJSVDDUad0PaVW OyTYadnOm3JEgN2fWc/oz65keFBaHOVHCAOOkqhciNX9XP1WbJR1hucTm4I9rGQt Q9ml3wfGi5Xtm1zJlhaE/QPaz7wdrF4RXBUrz3WgXBMbiHm9n6uvLXVgfsZIHNfB aoyWDYeL9qmUxqhI+TEJpiHnTEEOiwA/2z8T6Np9tfSsg0B7vpCYWYLuiAjHJubr 0bQ6N8RLGNjbuFnEluDE6IWWSRP8MJjdemhaA4WkwWzDckvGgCtpAUGu+IeNt7f2 armZ4BQSHQoEGYe8Gc0M =o8Gc -----END PGP SIGNATURE----- --da4uJneut+ArUgXk--
webmaster | delorie software privacy |
Copyright © 2019 by DJ Delorie | Updated Jul 2019 |