This is the mail archive of the cygwin mailing list for the Cygwin project.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

select() fails on multi-byte input in cygwin console (since 1.7.10)

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.

Thanks to the cygwin time machine, I could track back this bug to have
appeared in 1.7.10 (around the time I had reported another select()
issue: which I
hope doesnât interfere, nor the later issue


Diese E-Mail wurde von Avast Antivirus-Software auf Viren geprÃft.

Attachment: test-select.c
Description: Text document

Problem reports:
Unsubscribe info:

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]