select() fails on multi-byte input in cygwin console (since 1.7.10)
Tue Dec 9 11:19:00 GMT 2014
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
> 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
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
Corinna Vinschen Please, send mails regarding Cygwin to
Cygwin Maintainer cygwin AT cygwin DOT com
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Size: 819 bytes
Desc: not available
More information about the Cygwin