mirror of
git://sourceware.org/git/newlib-cygwin.git
synced 2025-02-02 12:30:24 +08:00
32edd9570d
- After commit 29431fcb5b14d4c5ac3b3161a076eb1a208349d9, the issue reported in https://cygwin.com/pipermail/cygwin/2020-May/245057.html occurs. This is caused by the following mechanism. Cygwin less called from non-cygwin git is executed under /dev/cons* rather than /dev/pty* because parent git process only inherits pseudo console handle. Therefore, less sets ICANON flag for /dev/cons* rather than original /dev/pty*. When pty is switched to non-cygwin git process, line_edit() is used in fhandler_pty_master::write() only to set input_available_event and read ahead buffer is supposed to be flushed in accept_input(). However, ICANON flag is not set for /dev/pty*, so accept_input() is not called unless newline is entered. As a result, the input data remains in the read ahead buffer. This patch fixes the issue.
THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. Cygwin documentation is available on the net at https://cygwin.com You might especially be interested in https://cygwin.com/faq/faq.html#faq.programming.building-cygwin