Skip to content

Commit b395521

Browse files
authored
Merge pull request #246 from git-for-windows/msys2-runtime-772caa703db5d9303ab6b24009e80a377ee00b94
msys2-runtime: update to 3.6.3-7
2 parents 26c3462 + 87b040c commit b395521

File tree

3 files changed

+83
-6
lines changed

3 files changed

+83
-6
lines changed
Lines changed: 74 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,74 @@
1+
From 6673d8e1b8a1be0e06528735d5375e1891bbe997 Mon Sep 17 00:00:00 2001
2+
From: Takashi Yano <[email protected]>
3+
Date: Thu, 3 Jul 2025 10:51:09 +0900
4+
Subject: [PATCH 56/N] Cygwin: console: Call set_input_mode() after changing
5+
disable_master_thread
6+
7+
With the commit 476135a24506, set_input_mode() reffers to the flag
8+
disable_master_thread in tty::cygwin mode. So it is necessary to call
9+
set_input_mode() after changing disable_master_thread flag. However,
10+
the commit 476135a24506 was missing that.
11+
12+
With this patch, set_input_mode() is called after changing the flag
13+
disable_master_thread, if the console input mode is tty::cygwin.
14+
15+
Fixes: 476135a24506 ("Cygwin: console: Set ENABLE_PROCESSED_INPUT when disable_master_thread");
16+
Signed-off-by: Takashi Yano <[email protected]>
17+
Cherry-picked-from: 65a48c7202 (Cygwin: console: Call set_input_mode() after changing disable_master_thread, 2025-07-03)
18+
Signed-off-by: Johannes Schindelin <[email protected]>
19+
---
20+
winsup/cygwin/fhandler/console.cc | 13 +++++++++----
21+
1 file changed, 9 insertions(+), 4 deletions(-)
22+
23+
diff --git a/winsup/cygwin/fhandler/console.cc b/winsup/cygwin/fhandler/console.cc
24+
index 48c9326..831df4f 100644
25+
--- a/winsup/cygwin/fhandler/console.cc
26+
+++ b/winsup/cygwin/fhandler/console.cc
27+
@@ -923,12 +923,12 @@ fhandler_console::cleanup_for_non_cygwin_app (handle_set_t *p)
28+
termios *ti = shared_console_info[unit] ?
29+
&(shared_console_info[unit]->tty_min_state.ti) : &dummy;
30+
/* Cleaning-up console mode for non-cygwin app. */
31+
+ set_disable_master_thread (con.owner == GetCurrentProcessId ());
32+
/* conmode can be tty::restore when non-cygwin app is
33+
exec'ed from login shell. */
34+
tty::cons_mode conmode = cons_mode_on_close (p);
35+
set_output_mode (conmode, ti, p);
36+
set_input_mode (conmode, ti, p);
37+
- set_disable_master_thread (con.owner == GetCurrentProcessId ());
38+
}
39+
40+
/* Return the tty structure associated with a given tty number. If the
41+
@@ -1121,8 +1121,8 @@ fhandler_console::bg_check (int sig, bool dontsignal)
42+
in the same process group. */
43+
if (sig == SIGTTIN && con.curr_input_mode != tty::cygwin)
44+
{
45+
- set_input_mode (tty::cygwin, &tc ()->ti, get_handle_set ());
46+
set_disable_master_thread (false, this);
47+
+ set_input_mode (tty::cygwin, &tc ()->ti, get_handle_set ());
48+
}
49+
if (sig == SIGTTOU && con.curr_output_mode != tty::cygwin)
50+
set_output_mode (tty::cygwin, &tc ()->ti, get_handle_set ());
51+
@@ -1987,8 +1987,8 @@ fhandler_console::post_open_setup (int fd)
52+
/* Setting-up console mode for cygwin app started from non-cygwin app. */
53+
if (fd == 0)
54+
{
55+
- set_input_mode (tty::cygwin, &get_ttyp ()->ti, &handle_set);
56+
set_disable_master_thread (false, this);
57+
+ set_input_mode (tty::cygwin, &get_ttyp ()->ti, &handle_set);
58+
}
59+
else if (fd == 1 || fd == 2)
60+
set_output_mode (tty::cygwin, &get_ttyp ()->ti, &handle_set);
61+
@@ -2995,7 +2995,12 @@ fhandler_console::char_command (char c)
62+
if (con.args[i] == 1) /* DECCKM */
63+
con.cursor_key_app_mode = (c == 'h');
64+
if (con.args[i] == 9001) /* win32-input-mode (https://github.com/microsoft/terminal/blob/main/doc/specs/%234999%20-%20Improved%20keyboard%20handling%20in%20Conpty.md) */
65+
- set_disable_master_thread (c == 'h', this);
66+
+ {
67+
+ set_disable_master_thread (c == 'h', this);
68+
+ if (con.curr_input_mode == tty::cygwin)
69+
+ set_input_mode (tty::cygwin,
70+
+ &tc ()->ti, get_handle_set ());
71+
+ }
72+
}
73+
/* Call fix_tab_position() if screen has been alternated. */
74+
if (need_fix_tab_position)

msys2-runtime/PKGBUILD

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
pkgbase=msys2-runtime
55
pkgname=('msys2-runtime' 'msys2-runtime-devel')
66
pkgver=3.6.3
7-
pkgrel=6
7+
pkgrel=7
88
pkgdesc="Cygwin POSIX emulation engine"
99
arch=('x86_64')
1010
url="https://www.cygwin.com/"
@@ -81,9 +81,10 @@ source=('msys2-runtime'::git+https://github.com/cygwin/cygwin#tag=cygwin-${pkgve
8181
0052-Cygwin-pipe-Fix-SSH-hang-with-non-cygwin-pipe-reader.patch
8282
0053-Cygwin-pipe-Update-source-comment-align-with-previou.patch
8383
0054-Cygwin-pipe-Make-pipe_data_available-return-PDA_UNKN.patch
84-
0055-Cygwin-console-Set-ENABLE_PROCESSED_INPUT-when-disab.patch)
84+
0055-Cygwin-console-Set-ENABLE_PROCESSED_INPUT-when-disab.patch
85+
0056-Cygwin-console-Call-set_input_mode-after-changing-di.patch)
8586
sha256sums=('53d2be8a2dcf58e7eae7823ef01a5b8ce0eba704b132d19167396eb162db378c'
86-
'dd0932cf89a81792e9c68a9f4c4689182136fa51b576ca04c443b00b1f88f8a5'
87+
'cf35ed71d4d740240a20e3fd075885302d859ac0a7178fc6a89619124539a81a'
8788
'5538db757661949423563bab5e4f383dfa4ef0cf3301cf43f23b482392554b3b'
8889
'2fb9b2b297797d20cd901eaee2de735e8cdda1c1e5836e9ff77856c0d1216860'
8990
'780977d71e35bbe4c0dcda5272895267d68d635f311e224f7981858f7192a85e'
@@ -138,7 +139,8 @@ sha256sums=('53d2be8a2dcf58e7eae7823ef01a5b8ce0eba704b132d19167396eb162db378c'
138139
'da17d0c9b64bc866b3b9bcbbeff0f3c109e494fd96d846f7920f08a48a1c9ce5'
139140
'b1acf1b24fa229da75cc522807fb76e94a5389449a652f250cf96151a6d20116'
140141
'de705488bd7572e09f0847ebd96bb8e5ff58f5dcaf7d4a967891939eb48ccf6b'
141-
'7de98fef5c5a79563278fdaefe95d9715477422521da15d0a51cf8e507b797e3')
142+
'7de98fef5c5a79563278fdaefe95d9715477422521da15d0a51cf8e507b797e3'
143+
'de6475de6d0e84edb9c26e7df33f98872d38d9d7534c128cbc32ae273d41de79')
142144

143145
# Helper macros to help make tasks easier #
144146
apply_patch_with_msg() {
@@ -247,7 +249,8 @@ prepare() {
247249
0052-Cygwin-pipe-Fix-SSH-hang-with-non-cygwin-pipe-reader.patch \
248250
0053-Cygwin-pipe-Update-source-comment-align-with-previou.patch \
249251
0054-Cygwin-pipe-Make-pipe_data_available-return-PDA_UNKN.patch \
250-
0055-Cygwin-console-Set-ENABLE_PROCESSED_INPUT-when-disab.patch
252+
0055-Cygwin-console-Set-ENABLE_PROCESSED_INPUT-when-disab.patch \
253+
0056-Cygwin-console-Call-set_input_mode-after-changing-di.patch
251254
}
252255

253256
build() {

msys2-runtime/msys2-runtime.commit

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
7674c51e18b9323c0072c8299c9356a7d9511a4e
1+
772caa703db5d9303ab6b24009e80a377ee00b94

0 commit comments

Comments
 (0)