diff --git a/msys2-runtime/0055-Cygwin-console-Set-ENABLE_PROCESSED_INPUT-when-disab.patch b/msys2-runtime/0055-Cygwin-console-Set-ENABLE_PROCESSED_INPUT-when-disab.patch new file mode 100644 index 00000000000..a3bb42b92a0 --- /dev/null +++ b/msys2-runtime/0055-Cygwin-console-Set-ENABLE_PROCESSED_INPUT-when-disab.patch @@ -0,0 +1,47 @@ +From 7674c51e18b9323c0072c8299c9356a7d9511a4e Mon Sep 17 00:00:00 2001 +From: Takashi Yano +Date: Tue, 1 Jul 2025 17:10:34 +0900 +Subject: [PATCH 55/N] Cygwin: console: Set ENABLE_PROCESSED_INPUT when + disable_master_thread + +Currently, ENABLE_PROCESSED_INPUT is set in set_input_mode() if +master_thread_suspended is true. This enables Ctrl-C handling when +cons_master_thread is suspended, since Ctrl-C is normally handled +by cons_master_thread. +However, when disable_master_thread is true, ENABLE_PROCESSED_INPUT +is not set, even though this also disables Ctrl-C handling in +cons_master_thread. Due to this bug, the command + C:\cygwin64\bin\sleep 10 < NUL +in the Command Prompt cannot be terminated with Ctrl-C. + +This patch addresses the issue by setting ENABLE_PROCESSED_INPUT +when either disable_master_thread or master_thread_suspended is true. + +This bug also affects cases where non-Cygwin Git (Git for Windows) +launches Cygwin SSH. In such cases, SSH also cannot be terminated +with Ctrl-C. + +Addresses: https://github.com/git-for-windows/git/issues/5682#issuecomment-2995983695 +Fixes: 746c8116dd4f ("Cygwin: console: Allow pasting very long text input.") +Reported-by: Johannes Schindelin +Signed-off-by: Takashi Yano +(cherry picked from commit 476135a24506dd624eb46b50fd634fcd740008ba) +Cherry-picked-from: 61cc419b2b (Cygwin: console: Set ENABLE_PROCESSED_INPUT when disable_master_thread, 2025-07-01)) +Signed-off-by: Johannes Schindelin +--- + winsup/cygwin/fhandler/console.cc | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/winsup/cygwin/fhandler/console.cc b/winsup/cygwin/fhandler/console.cc +index 08ac045..48c9326 100644 +--- a/winsup/cygwin/fhandler/console.cc ++++ b/winsup/cygwin/fhandler/console.cc +@@ -831,7 +831,7 @@ fhandler_console::set_input_mode (tty::cons_mode m, const termios *t, + break; + case tty::cygwin: + flags |= ENABLE_WINDOW_INPUT; +- if (con.master_thread_suspended) ++ if (con.master_thread_suspended || con.disable_master_thread) + flags |= ENABLE_PROCESSED_INPUT; + if (wincap.has_con_24bit_colors () && !con_is_legacy) + flags |= ENABLE_VIRTUAL_TERMINAL_INPUT; diff --git a/msys2-runtime/PKGBUILD b/msys2-runtime/PKGBUILD index 012456569b8..12fe95fe459 100644 --- a/msys2-runtime/PKGBUILD +++ b/msys2-runtime/PKGBUILD @@ -4,7 +4,7 @@ pkgbase=msys2-runtime pkgname=('msys2-runtime' 'msys2-runtime-devel') pkgver=3.6.3 -pkgrel=4 +pkgrel=5 pkgdesc="Cygwin POSIX emulation engine" arch=('x86_64') url="https://www.cygwin.com/" @@ -80,9 +80,10 @@ source=('msys2-runtime'::git+https://github.com/cygwin/cygwin#tag=cygwin-${pkgve 0051-fixup-pipe-fix-SSH-hang-again.patch 0052-Cygwin-pipe-Fix-SSH-hang-with-non-cygwin-pipe-reader.patch 0053-Cygwin-pipe-Update-source-comment-align-with-previou.patch - 0054-Cygwin-pipe-Make-pipe_data_available-return-PDA_UNKN.patch) + 0054-Cygwin-pipe-Make-pipe_data_available-return-PDA_UNKN.patch + 0055-Cygwin-console-Set-ENABLE_PROCESSED_INPUT-when-disab.patch) sha256sums=('53d2be8a2dcf58e7eae7823ef01a5b8ce0eba704b132d19167396eb162db378c' - '773577f853a78a36ac0f26ebfd885943386cac4f65610e7f32573c1818139e9f' + 'dd0932cf89a81792e9c68a9f4c4689182136fa51b576ca04c443b00b1f88f8a5' '5538db757661949423563bab5e4f383dfa4ef0cf3301cf43f23b482392554b3b' '2fb9b2b297797d20cd901eaee2de735e8cdda1c1e5836e9ff77856c0d1216860' '780977d71e35bbe4c0dcda5272895267d68d635f311e224f7981858f7192a85e' @@ -136,7 +137,8 @@ sha256sums=('53d2be8a2dcf58e7eae7823ef01a5b8ce0eba704b132d19167396eb162db378c' '0d6f7194e3c5052db24b5622d4b6d1ffac93a79b4266a1682993bf7af9b2ef35' 'da17d0c9b64bc866b3b9bcbbeff0f3c109e494fd96d846f7920f08a48a1c9ce5' 'b1acf1b24fa229da75cc522807fb76e94a5389449a652f250cf96151a6d20116' - 'de705488bd7572e09f0847ebd96bb8e5ff58f5dcaf7d4a967891939eb48ccf6b') + 'de705488bd7572e09f0847ebd96bb8e5ff58f5dcaf7d4a967891939eb48ccf6b' + '7de98fef5c5a79563278fdaefe95d9715477422521da15d0a51cf8e507b797e3') # Helper macros to help make tasks easier # apply_patch_with_msg() { @@ -244,7 +246,8 @@ prepare() { 0051-fixup-pipe-fix-SSH-hang-again.patch \ 0052-Cygwin-pipe-Fix-SSH-hang-with-non-cygwin-pipe-reader.patch \ 0053-Cygwin-pipe-Update-source-comment-align-with-previou.patch \ - 0054-Cygwin-pipe-Make-pipe_data_available-return-PDA_UNKN.patch + 0054-Cygwin-pipe-Make-pipe_data_available-return-PDA_UNKN.patch \ + 0055-Cygwin-console-Set-ENABLE_PROCESSED_INPUT-when-disab.patch } build() { diff --git a/msys2-runtime/msys2-runtime.commit b/msys2-runtime/msys2-runtime.commit index 62c69fe1b37..2f3f6cda179 100644 --- a/msys2-runtime/msys2-runtime.commit +++ b/msys2-runtime/msys2-runtime.commit @@ -1 +1 @@ -2f6e58433af2826e890cedbda94479610c78375d +7674c51e18b9323c0072c8299c9356a7d9511a4e