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] |
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. 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: https://sourceware.org/ml/cygwin/2011-05/msg00418.html which I hope doesnât interfere, nor the later issue https://sourceware.org/ml/cygwin/2013-01/msg00139.html). ------ Thomas --- Diese E-Mail wurde von Avast Antivirus-Software auf Viren geprÃft. http://www.avast.com
Attachment:
test-select.c
Description: Text document
-- 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
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |