delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2014/12/09/06:19:43

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:subject:message-id:reply-to
:references:mime-version:content-type:in-reply-to; q=dns; s=
default; b=wn95Grcp5u8kTEjNPKwxK8Ir9oePU/thshHvrIwqyKBISjhoJHt0O
YwutkusHbaJpfRZFd77v2WZ2B93BBlZaS1wJ7+K0WMdrGKUixrgAjOZBi8FlOgu8
uGAp5ylZwB/SruB3382FzKBSHJ2Q1uOcssSghtcha5l+Z5+js05hrw=
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:subject:message-id:reply-to
:references:mime-version:content-type:in-reply-to; s=default;
bh=yt9dKzL38Ks2TVNUOVuil9sF5tw=; b=K60CSwQvvWEGEothKznYs3vdBiNj
SGsFygMyH65mI0JZiM0kCaC9gtboQVJx4pwbKU4DisqLgHLLLdDMXD+zABzcd04p
N5rkPiI53m+UCqHzBsRcHgbIDFUNyH1SC0jnVbu3lGkaAUazslQ4bS3J14InTE3C
MzZre2eBIAk78TE=
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=-4.6 required=5.0 tests=AWL,BAYES_50 autolearn=ham version=3.3.2
X-HELO: calimero.vinschen.de
Date: Tue, 9 Dec 2014 12:19:22 +0100
From: Corinna Vinschen <corinna-cygwin AT cygwin DOT com>
To: cygwin AT cygwin DOT com
Subject: Re: select() fails on multi-byte input in cygwin console (since 1.7.10)
Message-ID: <20141209111922.GI3810@calimero.vinschen.de>
Reply-To: cygwin AT cygwin DOT com
Mail-Followup-To: cygwin AT cygwin DOT com
References: <54869E93 DOT 60304 AT towo DOT net>
MIME-Version: 1.0
In-Reply-To: <54869E93.60304@towo.net>
User-Agent: Mutt/1.5.23 (2014-03-12)

--tCudArHln/pcmL9z
Content-Type: text/plain; charset=utf-8
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable

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.

Did you try the latest snapshot or the 1.7.34-002 test release?  There's
a patch in there which fixes another problem with multibyte input and
VMIN:

https://cygwin.com/ml/cygwin-developers/2014-11/msg00000.html

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.


Thanks,
Corinna

--=20
Corinna Vinschen                  Please, send mails regarding Cygwin to
Cygwin Maintainer                 cygwin AT cygwin DOT com
Red Hat

--tCudArHln/pcmL9z
Content-Type: application/pgp-signature

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1

iQIcBAEBAgAGBQJUhtq6AAoJEPU2Bp2uRE+gHzMP/1pJacujO++SX0pJ1PlVSz8m
fN1inknq9usK6+EeiGnQPXB9jW/EE8EpauRBFwrAXzLbaEs2wd1TQgoBxTeIPM+d
1WUTAxJhfz3l+Jnn1Zl/ph1Gqd5eixPcBjFU95Ie3dKcwwGhs0Q0LUAhNUQErYgI
b4N5Ue0N4j1KIvoc7hOpcbL+UWZlZnfRAeF5dRZiOLlXilkq52CViIF8NPxpp3eo
V0OJrKKFp/uLmdfea8jdNobCMDWs4sku16Rdgwf9YPDG0Y5t/NNjEgdwcbZzPeqT
ulCJInQ4jrRoPFJTkajPy9/FkcF+euBAz7aq6uSfm+85YKYGt9GiWq4aOV6nB+vB
7FblCL8AkuP/SNnUWVYUwLZcaHFE9/MtstrNKrCQ87GH/JXnK1AJcN2pVBBwQ0zt
We2W3J8ZkTasrtRJNp9dGzwELNHreWfD4VyfI3wysFO2h86EAw39iCi4bEjsJ9g6
DLaAUvL7m6Svjr2Inw5AEC3V7zES+rKn9mjlgCpPB6frRB82FhiHvw1KyOxuxcbc
yygImvKBbJWeA2fiLQnHjnE9mj+AcAAWYsDZ7JJARspFksvUpBfGzDLL7a3Hs63e
qsHG3mK0crU9jrwa/uh0svo+gThWFNINgESbPB/24K4mogpOetB7Vupe62C5cc2e
a0kXRq0gkW/je9iJ2Qb8
=cLfR
-----END PGP SIGNATURE-----

--tCudArHln/pcmL9z--

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019