[PATCH] Cygwin: pty: Do not set input_available_event when applying line_edit()
Takashi Yano <[email protected]> Mon, 8 Jun 2026 22:34:06 +0900
| Newsgroups | gmane.os.cygwin.patches |
|---|---|
| Message-ID | <[email protected]> |
The commit a0b38a81b9be sets input_available_event even if the
transferred input is still in the readahead buffer and is not ready
to read. The SetEvent() is called in accept_input() via line_edit(),
so setting this event here is not correct. This causes the issue
that read() returns 0 instead of blocking until accept_input() is
called. This patch removes this SetEvent() call.
Fixes: a0b38a81b9be ("Cygwin: pty: Apply line_edit() for transferred input to to_cyg")
Addresses: https://cygwin.com/pipermail/cygwin/2026-June/259776.html
Reported-by: Koichi Murase <[email protected]>
Signed-off-by: Takashi Yano <[email protected]>
Reviewed-by:
---
winsup/cygwin/fhandler/pty.cc | 1 -
1 file changed, 1 deletion(-)
diff --git a/winsup/cygwin/fhandler/pty.cc b/winsup/cygwin/fhandler/pty.cc
index 80331c36d..2558fa799 100644
--- a/winsup/cygwin/fhandler/pty.cc
+++ b/winsup/cygwin/fhandler/pty.cc
@@ -2946,7 +2946,6 @@ fhandler_pty_master::apply_line_edit_to_transferred_input ()
n -= ret;
p += ret;
}
- SetEvent (input_available_event);
}
static DWORD
--
2.51.0