4
0
mirror of git://sourceware.org/git/newlib-cygwin.git synced 2025-01-22 23:17:28 +08:00
Corinna Vinschen c43952da4e Cygwin: ioctl: TIOCINQ: always return number of chars in the inbound queue
So far ioctl(TIOCINQ) could end up returning -1 with errno set to EINVAL
if a non-zero device error mask has been returned by ClearCommError.
This doesn't reflect Linux behaviour, which always returns the number of
chars in the inbound queue, independent of any I/O error condition.
EINVAL was a pretty weird error code to use in this scenario, too.

Fix this by dropping all checking for device errors in the TIOCINQ
case.  Just return the number of chars in the inbound queue.

Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
2020-10-14 10:54:13 -04:00

15 lines
583 B
Groff

Bug Fixes:
----------
- Fix accidental evaluation of NUL (\0) characters in xterm console output.
Don't move cursor to the right in case of a NUL character in the console
output stream, this is not backed by terminfo.
Addresses: https://cygwin.com/ml/cygwin/2020-02/msg00162.html
- Fix a segfault when starting, e.g., mintty from a bash in a console
running xterm emulation.
Addresses: https://cygwin.com/ml/cygwin/2020-02/msg00197.html
- Fix TIOCINQ to always return number of inbound chars if available.
Addresses: https://cygwin.com/ml/cygwin/2020-02/msg00258.html