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:message-id:date:from:mime-version:to:subject | |
:references:in-reply-to:content-type:content-transfer-encoding; | |
q=dns; s=default; b=tDRsjKpHRnSd9AVaB6IdL6DicnGs2Lp0gzcflRrx6K5 | |
sMf3qWma1I/W39CEiVFnY1O+jfmiVqwmy3E9PGovq7I/8GQQYmE5E7EidkkprJ9r | |
j6LVoOBTWPaMu8jPc7PsZ4FzJpgze6BrA1iw3YI25uWLh3RXzuS5rfpsnFhzigMo | |
= | |
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:message-id:date:from:mime-version:to:subject | |
:references:in-reply-to:content-type:content-transfer-encoding; | |
s=default; bh=aUDtZQRfVYNA8N4nf8Qq2OTYT9A=; b=BVI2wZR+0hqn4cPP4 | |
hEAXok+Kebl4aTf8ulCX+sb5m8CgLRFRFhGVJ6QiKYrgs/N24aE4OHU7cBQ0LCwU | |
B9FTu6Jbu4kQKyO0zR6ehzdQAWm/dKR32HpxycavCIdeMgtku7aqtrQ5zjdLhkgv | |
OdBKGokgnXBMclfH9F37a58WiQ= | |
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=3.9 required=5.0 tests=AWL,BAYES_50,FOREIGN_BODY,RCVD_IN_DNSWL_NONE,RCVD_IN_SORBS_WEB autolearn=no version=3.3.2 |
X-HELO: | mout.kundenserver.de |
Message-ID: | <5487F053.3020003@towo.net> |
Date: | Wed, 10 Dec 2014 08:03:47 +0100 |
From: | Thomas Wolff <towo AT towo DOT net> |
User-Agent: | Mozilla/5.0 (Windows NT 6.1; rv:31.0) Gecko/20100101 Thunderbird/31.3.0 |
MIME-Version: | 1.0 |
To: | cygwin AT cygwin DOT com |
Subject: | Re: select() fails on multi-byte input in cygwin console (since 1.7.10) |
References: | <54869E93 DOT 60304 AT towo DOT net> <20141209111922 DOT GI3810 AT calimero DOT vinschen DOT de> |
In-Reply-To: | <20141209111922.GI3810@calimero.vinschen.de> |
X-TagToolbar-Keys: | D20141210080346494 |
X-UI-Out-Filterresults: | notjunk:1; |
X-IsSubscribed: | yes |
Hi Corinna, Am 09.12.2014 um 12:19 schrieb Corinna Vinschen: > Hi Thomas, > > On Dec 9 08:02, Thomas Wolff wrote: >> Calling select() to check whether input from the terminal is available >> fails for all but the first byte in the cygwin console if multiple bytes >> are entered at once, like function or cursor keys or non-ASCII UTF-8 >> characters. >> Actually, the issue is volatile, sometimes it works for characters and >> most function keys. >> The problem most likely arises with the escape sequences mouse scroll >> and window focus out/in (both enabled by the test program). >> I tried to use read() with timeout instead, trying various combinations >> of tcsetattr setting VMIN/VTIME, fcntl setting O_NONBLOCK, using read() >> with buffer length 0, trying to interrupt read() with a timer signal, or >> even a combination of setitimer() and siglongjmp(). >> None of this works. > Your STC creates 0s and 1s, and it looks quite normal to me with the > latest from CVS. Without a short description I don't know exactly what > to look out for. There are lots of 0s, and if I press a cursor key > I see three 1s, one for each char of the escape sequence. I should have been more precise, and there are actually two slightly different effects (I noticed the first after my report): If you press a multi-byte key (like ä, €, F1), only the first byte will be seen by select() and echoed immediately by the test program. The remaining bytes will only appear after you have *released* the key (looking carefully before the keyboard auto-repeats...). Now, when you press a mouse key, the whole sequence appears, with the exception of mouse wheel scrolling or focus reports (click out then into the console window) - here only the first byte is seen until any other input. > Did you try the latest snapshot or the 1.7.34-002 test release? ... Yes, no change. (And yesterday's snapshot mentioned in some other thread is not yet visible.) > If that doesn't help, would you mind trying to track this down? You're > familiar with Cygwin's console code so you might get a clue what's going > wrong. Partially familiar... Since mouse escape sequences are all generated in the same way but there is a difference among them (the bug occurring with mouse scrolling and window focus switching), I'm afraid it's not simply the console code. I suspect there is some subtle interference between console code and Windows events (and I'm not familiar with Windows APIs). I could at best try to find out which of the changes 1.7.9->1.7.10 made the issue appear. We'll see... ------ Thomas > > > Thanks, > Corinna > --- Diese E-Mail wurde von Avast Antivirus-Software auf Viren geprüft. http://www.avast.com -- 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
webmaster | delorie software privacy |
Copyright © 2019 by DJ Delorie | Updated Jul 2019 |