Rebase to Cygwin v3.6.10 - #137
Merged
Merged
Conversation
Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
Skipping the 3.6.8 release because I screwed up. Signed-off-by: Corinna Vinschen <corinna@vinschen.de> (cherry picked from commit 8f1d2b499bc9e8007321090c1859e55c7ce7d417)
When a console process originating from a pseudo console exits, the
current sequence is as follows:
1) atexit handlers (pcon_handover_proc) called. This also closes
parent_pty_input_mutex which is introduced by the commit
c4fb720afcf1.
2) close_all_files() is called via _exit(). This terminates
cons_master_thread.
parent_pty_input_mutex is referenced in cons_master_thread, so
cons_master_thread may still use the mutex after it has been closed.
This can lead to undesired behaviour, including a deadlock. Instead
of registering pcon_hand_over_proc() as an atexit handler, this
patch calls pcon_handover_proc() at a point in fhandler_console::close
where cons_master_thread has already terminated, ensuring that no
other thread accesses the mutex.
Addresses: msys2/msys2-runtime#338
Fixes: c4fb720afcf1 ("Cygwin: console: Use input_mutex in the parent PTY in master thread")
Signed-off-by: Takashi Yano <takashi.yano@nifty.ne.jp>
Reviewed-by: Johannes Schindelin <Johannes.Schindelin@gmx.de>
(cherry picked from commit 9a360d364bb8f20cc7ec7567d2d136ca5d8e2454)
The commit 782aac5 introduced surrogate-pair handling. However, it does not work as expected in the legacy console. This is because, in legacy console, a KeyDown event for ALT key with UnicodeChar == 0 is inserted between the surrogate pair. The current code reads the next input event unconditionally for the second UnicodeChar, but it is not correct. This patch searches the next appropriate key event with a valid UnicodeChar, ensuring that the second code unit is valid. Fixes: 782aac5 ("Cygwin: console: Handle Unicode surrogate pairs.") Signed-off-by: Takashi Yano <takashi.yano@nifty.ne.jp> Reviewed-by: Johannes Schindelin <Johannes.Schindelin@gmx.de> (cherry picked from commit 1ff8990c0b8918c9ecad96314efa3f580a5e575c)
(cherry picked from commit e3cf6a9302d0cfc28eaad7556b0ce739b8641ae8)
The existing logic for open() assumes an fd is always available in the fdtable for a created file. This leads to a situation where, if there is no fd available due to the OPEN_MAX limit being hit, the file is created but cannot be referenced by a Cygwin fd. Move the fd reservation code to an earlier location within open(). Reported-by: Christian Franke <Christian.Franke@t-online.de> Addresses: https://cygwin.com/pipermail/cygwin/2026-May/259664.html Signed-off-by: Mark Geisert <mark@maxrnd.com> Fixes: e859706 (* autoload.cc (NtCreateFile): Add.) (cherry picked from commit 31bf91f867c5fadd7deb408cf06fe3af8e86bb74)
Fixes: 31bf91f867c5 ("Cygwin: Ensure unused fd available for open()")
Signed-off-by: Jon Turney <jon.turney@dronecode.org.uk>
(cherry picked from commit 35fcbb8cfbccc34d02611d54a06731dfcc075578)
Change "chown 18.544" to "18:544" in two locations. Reported-by: Lionel Cons <lionelcons1972@gmail.com> Addresses: <https://cygwin.com/pipermail/cygwin/2026-June/259786.html> Signed-off-by: Mark Geisert <mark@maxrnd.com> Fixes: b5a7cb0 (* cygserver-config: Use numeric id 18 instead of "system" in chown.) (cherry picked from commit f32a05ec3d73bd0ff917d94d8bacaa035f56e773)
SetClipboardData() and GetClipboardData() occasionally fail with ERROR_CLIPBOARD_NOT_OPEN, even though OpenClipboard() succeeded if NULL HWND is used. Retry until GetClipboardData() does not return ERROR_CLIPBOARD_NOT_OPEN. Addresses: https://cygwin.com/pipermail/cygwin/2026-February/259438.html Signed-off-by: Takashi Yano <takashi.yano@nifty.ne.jp> Reviewed-by: Mark Geisert <mark@maxrnd.com> (cherry picked from commit 7fd670a36b9a26c357f61650a6ec4a0e09936b7c)
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 <myoga.murase@gmail.com>
Signed-off-by: Takashi Yano <takashi.yano@nifty.ne.jp>
Reviewed-by: Mark Geisert <mark@maxrnd.com>
(cherry picked from commit f977d6edb4659a7ea1e341e2002f6d107e7d8013)
The current pty code performs the sequence: OpenProcess() -> DuplicateHandle() in various places. This helper function encapsulates that sequence to improve readability and maintainability. Signed-off-by: Takashi Yano <takashi.yano@nifty.ne.jp> Reviewed-by: Mark Geisert <mark@maxrnd.com> (cherry picked from commit c76e474c8c99d1e9690822c371acbe6244c6be00)
When the cursor position report ("CSI m;n R") is transferred from
cyg-pipe to nat-pipe, it is undesirably converted into Fn3 key by
pseudo console. This patch adds a workaround to prevent this
unintended conversion for cursor position report by enabling
ENABLE_VIRTUAL_TERMINAL_INPUT flag temporarily.
Addresses: https://cygwin.com/pipermail/cygwin/2026-June/259776.html
Reported-by: Koichi Murase <myoga.murase@gmail.com>
Signed-off-by: Takashi Yano <takashi.yano@nifty.ne.jp>
Reviewed-by: Mark Geisert <mark@maxrnd.com>
(cherry picked from commit ad65bc9742f2c232a2b8744f69fc31923965d768)
(cherry picked from commit d21aaac37996a5c49144c1fed0116eae1f302d86)
Without this patch, when a non-cygwin program (A) is about to exit, and
another non-cygwin program (B) is started, input transferring between
cyg-pipe and nat-pipe may not work as expected. When the non-cygwin
program (A) exits, input transferring from nat-pipe to cyg-pipe will be
performed. However, the the non-cygwin program (B) will performs input
transferring from cyg-pipe to nat-pipe at the same time. The mechanism
of the problem is as follows.
1) The the non-cygwin program (A) checks current input pipe state,
then it is nat-pipe since the this program is a non-cygwin program.
The program (A) also checks if any handover target exists, but
it is not found since the program (B) is not started yet. So,
the program (A) decided to transfer input form nat-pipe to cyg-
pipe.
2) Before the non-cygwin (A) program performs input transferring,
if the non-cygwin program (B) is started and checks the input
pipe state, it is nat-pipe state, so the non-cygwin program (B)
does not perform input transferring.
3) However, just after that, the non-cygwin program (A) performs
input transferring from nat-pipe to cyg-pipe, so typeahead input
will be stored in cyg-pipe.
4) The non-cygwin program (B) cannot read the typeahead input
because it is now in the cyg-pipe.
The following code demonstrates the issue.
#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
int main(int argc, char *argv[])
{
int n = 1;
if (argc > 1)
n = atoi(argv[1]);
if (fork()) {
execlp("cmd.exe", "cmd", NULL);
perror("execlp(\"cmd\"): ");
}
for (int i=0; i<n; i++) {
if (fork() == 0) {
execlp("./non-cygwin-app.exe", "non-cygwin-app", "0", NULL);
perror("execlp(\"non-cygwin-app\"): ");
}
}
return 0;
}
Transferring input itself is guarded by input_mutex, but the pre-
check is not. With this patch, the guard is enhanced so that the
state check and transferring input are done in atomic way.
Fixes: f206417 ("Cygwin: pty: Reduce unecessary input transfer.")
Signed-off-by: Takashi Yano <takashi.yano@nifty.ne.jp>
Reviewed-by: Mark Geisert <mark@maxrnd.com>
(cherry picked from commit f3eecb723bed090b73753b3d428329e90c960aac)
…put() In transfer_input(), CR and NL in the data transferred to nat-pipe is treated as follows: 1) If pseudo console is activated, convert NL to CR. 2) If pseudo console is disabled, convert CR to NL. This conversion is necessary to ensure non-cygwin apps can handle CR/NL as expected. Therefor, CR and NL should be treated as the same way in accept_input() if the data is sent to nat-pipe. In the previous implementation, problems rarely occurred because accept_input() normally does not handle input for non-cygwin apps when the pseudo console is active. Under typical conditions, such input is set to pseudo console directly by WriteFile(), so accept_input() is not involved and no conversion issues arise. There is, however, a brief period during pseudo console initialization in which accept_input *does* handle the input. This happens because master::write() invokes line_edit() while in pcons_start mode. During this short window, the input is processed in pseudo-console-enabled mode, and the usual conversion behaviour may not apply. When the pseudo console is disabled, accept_input() always handles the input, and in most cases the ICRNL flag is set by shell, so line_edit() performs the CR->NL conversion. But if the flag is not set, this conversion does not occur. Therefore, the additional conversion introduced by this patch is required to ensure consistent behaviour in both cases. Fixes: f206417 ("Cygwin: pty: Reduce unecessary input transfer.") Signed-off-by: Takashi Yano <takashi.yano@nifty.ne.jp> Reviewed-by: Mark Geisert <mark@maxrnd.com> (cherry picked from commit 0f6dad639e1791d95cffd7a2490b82dff354eec2)
…ed to Currently, disabling cons_master_thread is done by just setting the flag disable_master_thread. In fact, actual suspension of master thread is delayed a bit. Therefore, non-cygwin program where the master thread should be disabled may run even though the master thread is running in a short time. This patch ensure that the master thread is suspended when non-cygwin app is running. In addition, while master thread is running, console mode should not be changed. Therefore, the order of set_input_mode() call and disabling/enabling master thread is swapped. Fixes: d2b14c3 ("Cygwin: console: Redesign handling of special keys.") Signed-off-by: Takashi Yano <takashi.yano@nifty.ne.jp> Reviewed-by: Mark Geisert <mark@maxrnd.com> (cherry picked from commit 733d5a953fa952ba9572ef00019f3a6c70a2da73)
If you run "stty noflsh; cat" in "bash", and stop "cat" by Ctrl-C, a stray ^C is passed to "bash". The current code calls tcflush() if NOFLSH is not set, however, tcflush() is not called when NOFLSH is set. So, Ctrl-C remains in console input buffer. This should be discarded even in NOFLSH mode. This patch introduces a helper function discard_key_events() and call it to erase Ctrl-C in the console input buffer. Note that even with this patch, NOFLSH is not fully functional in console because the readahead buffer is unique to process, so it cannot be inherited to other processes. However, it should work intra process. Fixes: 118e51b ("(tty_min::kill_pgrp): Handle tty flush when signal detected.") Signed-off-by: Takashi Yano <takashi.yano@nifty.ne.jp> Reviewed-by: Mark Geisert <mark@maxrnd.com> (cherry picked from commit 66324edf64a9ef0672e445c870b5a38c091f7b38)
Currently, following misbehaviour occurs in bash. 1) Run "sleep 10". 2) Type "cmd<enter>ps<enter>" while "sleep is running". 3) After "sleep" ends, "ps" does not run in "cmd". 4) exit from "cmd". Then, "ps" is executed. This is because process_input_message() handles all the events in the console input buffer, and stores key input into readahead buffer. However, since the readahead buffer is unique to process, "cmd" cannot read it. Since "ps<enter>" is stored in bash's readahead buffer, it is executed by bash after "cmd" exits. With this patch, process_input_message() handles only the requested amount of events by read(). Fixes: 8382778 ("Cygwin: console: fix select() behaviour") Signed-off-by: Takashi Yano <takashi.yano@nifty.ne.jp> Reviewed-by: Mark Geisert <mark@maxrnd.com> (cherry picked from commit fac73911f5a0732922168df216dc84cc730fe144)
…input mode
When a cygwin program and a non-cygwin program run in the same foreground
process group (for example the pipeline `cat | ping`), Ctrl-C stopped
interrupting the cygwin program after "Cygwin: console: Ensure the master
thread runs only when it is supposed to".
The console only delivers Ctrl-C as a raw 0x03 byte (which the console
master thread reads and turns into a SIGINT for the foreground process
group) while that thread is live. When it is suspended or disabled,
set_input_mode (tty::cygwin) instead requests ENABLE_PROCESSED_INPUT,
so the console raises a CTRL_C_EVENT and the 0x03 byte never reaches
the master thread. The referenced commit reordered the two explicit
enable paths, bg_check () and post_open_setup (), and one path which
normally(*1) enables master thread, clearnup_for_non_cygwin_app(), so
that set_input_mode (tty::cygwin) runs while disable_master_thread is
still set; that leaves ENABLE_PROCESSED_INPUT on and the cygwin program
never receives its SIGINT.
(*1 ... except the process which calls exec() for non-cygwin app while
itself is the cons master. In this case, subsequent set_input_mode()
call sets the mode to tty::restore, and the master thread should be
kept 'disabled' until the process exits.)
Clear disable_master_thread before selecting cygwin input mode in those two
paths, so the mode is configured with the master thread already live and
ENABLE_PROCESSED_INPUT stays off. The disable paths and the synchronous
suspension that the referenced commit added are left unchanged, so
non-cygwin programs still get the master thread reliably suspended.
Fixes: 733d5a953fa9 ("Cygwin: console: Ensure the master thread runs only when it is supposed to")
Assisted-by: Opus 4.8
Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Co-Authored-by: Takashi Yano <takashi.yano@nifty.ne.jp>
Reviewed-by: Takashi Yano <takashi.yano@nifty.ne.jp>
(cherry picked from commit 41e6325ad64fa00f5e61e25c2020a8bc716c29a0)
The previous fix for NOFLSH mode does not work as intended.
discard_key_events(), added in "Cygwin: console: Fix NOFLSH behaviour a
bit", loops on ReadConsoleInputW() until it has consumed the requested
number of records, but ReadConsoleInputW() blocks while the console
input buffer is empty. sigflush() calls it with a hard-coded count of
one and no guarantee that a record is actually queued: in the
master-thread path the signalling record has already been read out of
the buffer before sigflush() runs, so the call blocks until, and then
swallows, the user's next keystroke.
To avoid this, this patch does not discard input when process_sigs()
is called from cons_master_thread, where the value of `fh` is NULL,
because discarding will be done in cons_master_thread.
And because the ReadConsoleInputW() return value is unchecked, a failed
read leaves the count indeterminate, so "n -= n1" can underflow and spin.
Check return value of ReadConsoleInputW() and abort if it fails.
Moreover, discard_key_event(1) does not work as intended if the first
key event is not a bKeyDown event correspoding to the signalling key.
Use discard_key_events(0) instead. This means discarding input events
to the current position processed. Since the key-strokes prior to the
signalling key are already in the readahead buffer, so this call discards
only the signalling key. The important point here is to discard input
before releasing input_mutex by release_input_mutex_if_necessary(),
because, if not, cons_master_thread starts to process key events before
discarding signalling key event because the thread can acquire
input_mutex. This causes the signalling key is processed twice.
One separate point: the `process_input_message()` caller wraps
`discard_key_events()` in `acquire_attach_mutex()` + `attach_console
(con.owner)`, but the `sigflush()` call site does not, so the
`ReadConsoleInputW()` there runs against whatever console the calling
process happens to be attached to. With the guard above the worst case
is a no-op when the calling process happens not to be attached, so
it would be more correct to move the attach into the helper itself.
This patch also fixes two more special cases. One is done_with_debugger
case. When `gdb cat` is executed and the `cat` is running, Ctrl-C
discards all the key events including the events after Ctrl-C. This
is because tcflush() is used for the purpose. Use discard_key_events(0)
instead. The other case is not_signalled_but_done case. Previously,
when `cat | non-cygwin-app` is executed and Ctrl-C is pressed, but
the `Ctrl-C` is not VINTR, line_edit() wrongly returned
line_edit_signalled even though `cat` is not signalled by Ctrl-C.
In this case, `cat` should receive Ctrl-C as a input char, while
`non-cygwin-app` has been killed by Ctrl-C. Fix this in line_edit().
In the case of not_signalled_but_done case, setting `sawsig` flag
and releasing `output_stopped` has been skipped with this patch,
because this (Ctrl-C) is not a signal key in the case above.
Fixes: 66324edf64a9 ("Cygwin: console: Fix NOFLSH behaviour a bit")
Co-authored-by: Johannes Schindelin <Johannes.Schindelin@gmx.de>
Signed-off-by: Takashi Yano <takashi.yano@nifty.ne.jp>
Reviewed-by: Johannes Schindelin <Johannes.Schindelin@gmx.de>
(cherry picked from commit 0d516c2b1f4d7e4abcf4be55056b5cd87f566e5e)
On the command "cat | non-cygwin-app", `cat` sometimes fails to read key input. This happens when `cat` starts to read input before `non- cygwin-app` configures pseudo console. This is because pipe state is switched to nat-pipe when pseudo console is configured. This patch prevent the pipe state from changing to nat-pipe state if some cygwin process is reading input from the cyg-pipe. Fixes: f206417 ("Cygwin: pty: Reduce unecessary input transfer.") Signed-off-by: Takashi Yano <takashi.yano@nifty.ne.jp> Reviewed-by: Johannes Schindelin <Johannes.Schindelin@gmx.de> (cherry picked from commit 4c0fc56cad9d39afbacebcc58d2174d1af131b2c)
Previously, nat_pipe_owner_pid was incorrectly set to 0 when the inferior of gdb was a non-cygwin app. Due to this bug, repeatedly running a non-cygwin app under gdb could lead to an unexpected crash. This occurred because the previous code in setup_for_non_cygwin_app() set nat_pipe_owner_pid to exec_dwProcessId, which is correct when the caller is the stub process of the non-cygwin app. exec_dwProcessId is the PID of the stub process, and dwProcessId is the PID of the spawned process in the stub process. However, when the caller is gdb, since the owner should be gdb itself, nat_pipe_owner_pid must be set to myself->dwProcessId where the normal process's PID is stored. With this fix, attach_console_temporarily() can be called with target pid equal to the process's own pid in gdb, in which case the attach operation is skipped. Note that this issue commonly occurs in programs that launch non- cygwin app directly via CreateProcess(), as gdb does. Fixes: 1e6c51d ("Cygwin: pty: Reorganize the code path of setting up and closing pcon.") Signed-off-by: Takashi Yano <takashi.yano@nifty.ne.jp> Reviewed-by: Johannes Schindelin <Johannes.Schindelin@gmx.de> (cherry picked from commit 50f4ff48727f138bded3f1c4e41357b46df1ef95)
This commit starts the rebase of d2aae93 to 55c0944d2d
When a Cygwin process (e.g. `bash` under MinTTY) spawns a native Win32 child (e.g. `git.exe`) with pseudo console support enabled, the child gets a pseudo console that bridges the pty. If that native child then spawns a Cygwin grandchild (e.g. `vim`, `less`), the grandchild inherits the pseudo console's console handles. In `init_std_file_from_handle()`, the grandchild's msys2-runtime sees `GetConsoleScreenBufferInfo()` succeed on those handles and, with no valid `ctty` set, falls back to `FH_CONSOLE` and gives the process `cons0` instead of connecting to the pty. This causes scrollback clobbering in MinTTY because alternate screen sequences (`ESC[?1049h` / `ESC[?1049l`) are handled by `fhandler_console`'s `save_restore()` against the pseudo console's buffer, which has no correspondence to MinTTY's scrollback. Fix this in the existing console branch of `init_std_file_from_handle()`: when there is no valid `ctty` and we are about to fall back to `FH_CONSOLE`, first scan the shared tty table for an entry whose `pcon_activated` is set and whose `nat_pipe_owner_pid` is in our console's process list (via `GetConsoleProcessList`). If found, parse the device as that pty slave instead of as a real console. The handle is closed in either fallback path, matching the existing `FH_CONSOLE` behavior. `myself->ctty` is left untouched; the regular `fhandler_pty_slave::open_setup()` path will set it via `myself->set_ctty()` when the pty slave is opened. The structure of `find_pcon_pty()` matters and is easy to get wrong in case a keen developer would like to refactor this code in the future. This code runs on every Cygwin process startup whose parent is non-Cygwin, so the common path (no pty with an active pseudo console) must remain free of expensive operations. Two pitfalls to avoid: filtering tty entries with `tty::exists()` looks correct but creates and destroys a named pipe per entry (128 entries on every call), and hoisting the `GetConsoleProcessList()` call out of the loop pays the cross-process cost even when no candidate exists. The current shape, a cheap shared-memory boolean check first and a lazily fetched process list only on the first candidate, keeps the common case at a handful of pointer reads. Reported downstream at git-for-windows/git#5303 and bisected to a Git for Windows release that upgraded the bundled msys2-runtime from 3.3.6 (no pseudo console code) to 3.4.6 (the new pseudo console architecture). Fixes: bb42852 ("Cygwin: pty: Implement new pseudo console support.") Assisted-by: Claude Opus 4.7 (1M context) Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de> Reviewed-by: Takashi Yano <takashi.yano@nifty.ne.jp> (cherry picked from commit 6eed1ef74869e113c01c97a226fb11a1bad21e40)
Previously, the process on pty could not be a child of non-cygwin process. In that case, it is not necessary to flush pcon input buffer even when discard_input() is called. However, now, the child process of non-cygwin app on pseudo console is running on pty. So, discard_input() should affect to the pcon input buffer as well. This prevents the problem wihch can be demonstrated by: 1) Run 'sleep 10' in cmd.exe 2) Enter 'ps\n' while sleeping 3) Press Ctrl-C 4) 'ps' will be executed after terminating 'sleep' by Ctrl-C. Signed-off-by: Takashi Yano <takashi.yano@nifty.ne.jp> Reviwed-by: Mark Geisert <mark@maxrnd.com> (cherry picked from commit ee929717bd09bd5612419e971cba7b6370039431)
Previously, the cygwin process on pty is always a child of another
cygwin app on pty. If a cygwin app is a child of non-cygwin app
in pseudo console, it was running on console originating from
pseudo console. Now, the child of a non-cygwin app on pseudo console
is running on pty, so, it is necessary to restore the pty state
to the state where the parent process is running. This patch
does the following fixup when the cygwin process on pty exits:
1) Switch pipe mode from cyg-pipe to nat-pipe.
2) Notify the current cursor position to pseudo console
These prevent the problems:
1) Run 'cat' in cmd.exe and stop it by Ctrl-C. After that
cmd.exe cannot receive key input.
2) Run 'ps' in cmd.exe. The cursor position will not be
maintained correctly after that.
Signed-off-by: Takashi Yano <takashi.yano@nifty.ne.jp>
Reviewed-by: Mark Geisert <mark@maxrnd.com>
(cherry picked from commit b34394d456b6d46fc112273183fc0cae5a613e18)
find_pcon_pty() was passing a fixed 128-DWORD stack array to GetConsoleProcessList(). If the calling Cygwin process happens to be attached to a console with more than 128 processes, the Win32 function returns the required size and the buffer contents are undefined; the existing if-zero check did not catch that case, so the subsequent loop walked uninitialised data and could either miss the candidate pty or, worse, match against junk PIDs and return the wrong tty index. Adopt the buffer-too-small dance from fhandler_termios::get_console_process_id() in winsup/cygwin/fhandler/termios.cc, which already had to solve this problem and which also notes that the new condrv does not accept oversized first-call buffers (microsoft/terminal#18264 (comment)). The buffer comes from tmp_pathbuf so the same NT_MAX_PATH cap (currently 1024 DWORDs, i.e. 4096 processes) applies; we bail out with -1 if even that is not enough rather than allocate unbounded memory or guess. Bumping the start-with size from 1 would defeat the condrv work-around mentioned above, so we keep the same one-element initial probe as termios.cc and let the loop grow. Suggested-by: Takashi Yano <takashi.yano@nifty.ne.jp> Assisted-by: Opus 4.7 Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de> (cherry picked from commit b65e154)
…annot hang
The cursor-position fixup added in "Cygwin: pty: Fixup pty state after
a cygwin app exits" runs from cleanup() on every foreground Cygwin-app
exit while a pseudo console is active, and it waits on two unbounded
loops for the master to answer the "ESC[6n" it just sent: one that
spins until the pcon_start_pid slot is free, and one that spins until
the master clears the slot again. pcon_start_pid is only ever cleared
once master::write() parses the terminal's reply, so if that reply
never comes, because the terminal is going away, the forwarding pipe
is broken, or a previous requester died mid-handshake, the exiting
process spins on yield() forever and never exits.
Bound both waits with a three second deadline using GetTickCount64(),
and on timeout clear our own pcon_start_pid slot, but only if it is
still ours, so a give-up does not stomp a later requester. Also restore
the pcon_start and pcon_start_pid reset that the same commit removed
from close_pseudoconsole(); it is the backstop that keeps a requester
which died without clearing its slot from wedging the next one. The
worst case is now a slightly stale cursor after a timeout rather than a
process that refuses to exit.
Fixes: b34394d456b6 ("Cygwin: pty: Fixup pty state after a cygwin app exits")
Assisted-by: Opus 4.8
Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Co-authored-by: Takashi Yano <takashi.yano@nifty.ne.jp>
Reviewed-by: Takashi Yano <takashi.yano@nifty.ne.jp>
…_setup()
When a Cygwin process opens a pty slave whose pseudo console is already
active, open() has just installed duplicates of the cyg master-side
pipe ends into io_handle_nat and output_handle_nat. The pcon adoption
added in "Cygwin: pty: Fixup pty state after a cygwin app exits"
overwrites those two slots via &get_handle_nat() / &get_output_handle_nat()
without closing them first, so two handles leak on every pcon-backed
grandchild open. It also hands the result of OpenProcess() straight to
DuplicateHandle() without a NULL check, so if the nat-pipe owner has
already exited both duplications fail and leave the nat slots NULL,
which then breaks the slave's input routing.
Close the old slots before replacing them, skip the replacement
entirely when OpenProcess() returns NULL so we degrade to the handles
open() installed, and make the pair transactional so a partial success
cannot leave one original slot and one pcon slot.
Fixes: b34394d456b6 ("Cygwin: pty: Fixup pty state after a cygwin app exits")
Assisted-by: Opus 4.8
Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
The Ctrl+C way to interrupt run-away processes is highly important. It was recently broken in multiple ways in the Cygwin runtime (and hence also in the MSYS2 runtime). Let's add some integration tests that will catch regressions. It is admittedly less than ideal to add _integration_ tests; While imitating exactly what the end user does looks appealing at first, excellent tests impress by how quickly they allow regressions not only to be identified but also to be fixed. Even worse: all integration tests, by virtue of working in a broader environment than, say, unit tests, incur the price of sometimes catching unactionable bugs, i.e. bugs in software that is both outside of our control as well as not the target of our testing at all. Nevertheless, seeing as Cygwin did not add any unit tests for those Ctrl+C fixes (which is understandable, given how complex testing for Ctrl+C without UI testing would be), it is better to have integration tests than no tests at all. So here goes: This commit introduces a test that verifies that the MSYS2 `sleep.exe` can be interrupted when run from PowerShell in a Windows Terminal. This was broken in v3.6.0 and fixed in 7674c51 (Cygwin: console: Set ENABLE_PROCESSED_INPUT when disable_master_thread, 2025-07-01). Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
This was the actual use case that was broken and necessitated the fix in 7674c51 (Cygwin: console: Set ENABLE_PROCESSED_INPUT when disable_master_thread, 2025-07-01). It does require an SSH server, which Git for Windows no longer ships. Therefore, this test uses the `sshd.exe` of OpenSSH for Windows (https://github.com/powershell/Win32-OpenSSH) in conjunction with Git for Windows' `ssh.exe` (because using OpenSSH for Windows' variant of `ssh.exe` would not exercise the MSYS2 runtime and therefore not demonstrate a regression, should it surface in the future). To avoid failing the test because OpenSSH for Windows is not available, the test case is guarded by the environment variable `OPENSSH_FOR_WINDOWS_DIRECTORY` which needs to point to a directory that contains a working `sshd.exe`. Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
In the previous commit, I added a new UI test that generates a somewhat large repository for testing the clone via SSH. Since that repository is created in the test directory, that would inflate the `ui-tests` build artifact rather dramatically. So let's create the repository outside of that directory. Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
The fixes of 7674c51 (Cygwin: console: Set ENABLE_PROCESSED_INPUT when disable_master_thread, 2025-07-01) were unfortunately not complete; There were still a couple of edge cases where Ctrl+C was unable to interrupt processes. Let's add a demonstration of that issue. Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
In 0ae6a6f (Cygwin: pipe: Fix SSH hang with non-cygwin pipe reader, 2025-06-27), a quite problematic bug was fixed where somewhat large-ish repositories could not be cloned via SSH anymore. This fix was not accompanied by a corresponding test case in Cygwin's test suite, i.e. there is no automated way to ensure that there won't be any regressions on that bug (and therefore it would fall onto end users to deal with those). This constitutes what Michael C. Feathers famously characterized as "legacy code" in his book "Working Effectively with Legacy Code": To me, legacy code is simply code without tests. I've gotten some grief for this definition. What do tests have to do with whether code is bad? To me, the answer is straightforward, and it is a point that I elaborate throughout the book: Code without tests is bad code. It doesn’t matter how well written it is; it doesn’t matter how pretty or object-oriented or well-encapsulated it is. With tests, we can change the behavior of our code quickly and verifiably. Without them, we really don’t know if our code is getting better or worse. Just to drive this point home, let me pull out Exhibit A: The bug fix in question, which is the latest (and hopefully last) commit in a _long_ chain of bug fixes that fix bugs introduced by preceding bug fixes: - 9e4d308 (Cygwin: pipe: Adopt FILE_SYNCHRONOUS_IO_NONALERT flag for read pipe., 2021-11-10) fixed a bug where Cygwin hung by mistake while piping output from one .NET program as input to another .NET program (potentially introduced by 3651990 (Cygwin: pipe: Avoid false EOF while reading output of C# programs., 2021-11-07), which was itself a bug fix). It introduced a bug that was fixed by... - fc691d0 (Cygwin: pipe: Make sure to set read pipe non-blocking for cygwin apps., 2024-03-11). Which introduced a bug that was purportedly fixed by... - 7ed9adb (Cygwin: pipe: Switch pipe mode to blocking mode by default, 2024-09-05). Which introduced a bug that was fixed by... - cbfaeba (Cygwin: pipe: Fix incorrect write length in raw_write(), 2024-11-06). Which introduced a bug that was fixed by... the SSH hang fix in 0ae6a6f (Cygwin: pipe: Fix SSH hang with non-cygwin pipe reader, 2025-06-27). There is not only the common thread here that each of these bug fixes introduced a new bug, but also the common thread that none of the commits introduced new test cases into the test suite that could potentially have helped prevent future breakages in this code. So let's at least add an integration test here. Side note: I am quite unhappy with introducing integration tests. I know there are a lot of fans out there, but I cannot help wondering whether they favor the convenience of writing tests quickly over the vast cost of making debugging any regression a highly cumbersome and unenjoyable affair (try single-stepping through a test case that requires several processes to be orchestrated in unison). Also, integration tests have the large price of introducing moving parts outside the code base that is actually to be tested, opening the door for breakages caused by software (or infrastructure, think: network glitches!) that are completely outside the power or responsibility of the poor engineer tasked with fixing the breakages. Nevertheless, I have been unable despite days of trying to wrap my head around the issue to figure out a way to reproduce the `fhandler_pipe_fifo::raw_write()` hang without involving a MINGW `git.exe` and an MSYS2/Cygwin `ssh.exe`. So: It's the best I could do with any reasonable amount of effort. It's better to have integration tests that would demonstrate regressions than not having any tests for that at all. Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
On hosted GitHub Actions runners, there is always this Log window visible on the Desktop, and due to some magic logic, this window is sometimes in the foreground on the `windows-2025` runners. Let's minimize it so that it is out of the way and does not interfere with the AutoHotKey-based UI tests. Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
The existing UI test infrastructure only supports Windows Terminal, but the keystroke reordering bug reported in git-for-windows/git#5632 manifests most reliably in mintty, which uses a different PTY code path. To write a reproducer for that bug, we need library functions that can launch mintty and read back what it displayed. An initial attempt used mintty's `-l` flag to write a terminal log file, then read back that log with ANSI escape sequences stripped. This approach turned out to be unreliable: mintty buffers its log output, so content that is already visible on screen (such as the `$ ` prompt) may not have been flushed to the log file yet. Polling for a prompt that is already displayed but not yet logged leads to an indefinite wait. Instead, LaunchMintty() configures mintty's Ctrl+F5 keybinding to trigger the `export-html` action, which writes an HTML snapshot of the current screen to a file. This is instantaneous and always reflects exactly what is on screen. The function uses window-class enumeration to identify the newly-created mintty window among any pre-existing instances and returns its handle. CaptureBufferFromMintty() sends Ctrl+F5 to trigger the export, reads the resulting HTML file, extracts the `<body>` content, strips HTML tags, and decodes common entities to return plain text suitable for substring matching. It accepts an optional window title to activate the correct mintty instance before sending the keystroke. Note that AHK's ControlSend cannot be used here because mintty passes the raw keycodes through to the terminal session rather than interpreting them as window-level shortcuts, so WinActivate followed by Send is the only way to trigger the export action. Assisted-by: Claude Opus 4.6 Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
msys2-runtime: restore fast path for current user primary group
This adds an AutoHotKey test that reliably reproduces the keystroke reordering bug described at git-for-windows/git#5632 where characters typed into a bash prompt arrive in the wrong order. The root cause lies in the MSYS2 runtime's PTY input handling: when a non-MSYS2 process (such as PowerShell or cmd.exe) runs in the foreground of a PTY, the transfer_input() function in pty.cc can reorder bytes across pipe buffer boundaries. This is particularly visible when backspace characters get separated from the characters they were meant to delete. The test exploits this by launching a PowerShell process that saturates all CPU cores with tight cmd.exe loops while simultaneously running an MSYS2 sleep.exe in the foreground. While this stress process runs, the test rapidly types characters interleaved with backspaces at 1ms key delay. It walks through the full alphanumeric test string in chunks of two characters, appending two sacrificial characters (",;", chosen for visual dissimilarity with the letters so that they can be spotted very easily in the middle of the output) after each chunk followed by two backspaces to delete them. If the PTY delivers the bytes in order, the backspaces cleanly remove the ",;" and the result matches the original test string. If transfer_input() reorders bytes across buffer boundaries, the backspaces land in the wrong position and the "," or ";" characters leak through, producing visibly jumbled output like "GH,ABCDEFIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789". Using small chunks maximizes the number of buffer boundaries that the PTY must handle, which makes the reordering more dramatic and reliable across different environments. The cpu-stress.ps1 helper script uses cygpath to locate sleep.exe via its POSIX path so that the script works in both the full SDK (where MSYS2 tools live under a Git SDK directory) and in CI (where they live under C:\Program Files\Git). With the current runtime, the bug triggers on the very first iteration in every run tested. The fix for keystroke reordering that occurs when the pseudo console oscillates between creation and teardown removes a transfer_input(to_nat) call from the "non-pcon xfer" code path in master::write(). That code path was specifically added in Cygwin commit acc44e0 ("Cygwin: pty: Add missing input transfer when switch_to_pcon_in state", 2021-12-11) to fix a different input routing bug that manifested only when the pseudo console was disabled: https://inbox.sourceware.org/cygwin-patches/20211212130347.10080-1-takashi.yano@nifty.ne.jp/ That patch was in response to a report about spurious ANSI escape sequences ("ghost-typing") appearing in the terminal after quitting vim when git.exe (a native process) spawned vim.exe (a Cygwin process) with the pseudo console disabled: https://inbox.sourceware.org/cygwin-patches/nycvar.QRO.7.76.6.2112092345060.90@tvgsbejvaqbjf.bet/ git-for-windows/git#3579 The transfer was originally introduced as part of a broader effort to preserve typeahead across the two input pipes, starting with Cygwin commit 10d083c ("Cygwin: pty: Inherit typeahead data between two input pipes", 2021-01-28): https://inbox.sourceware.org/cygwin-patches/20210128032614.1678-2-takashi.yano@nifty.ne.jp/ which itself was prompted by a user report about typed characters disappearing while native programs were running: https://inbox.sourceware.org/cygwin/7e3d947e-b178-30a3-589f-b48e6003fbb3@googlemail.com/ Since removing that transfer could theoretically regress the disable_pcon scenario, extend the existing keystroke-order test to also run with MSYS=disable_pcon set. The test reuses the same RunKeystrokeTest() helper and stress command, just with fewer iterations since the disable_pcon code path is simpler and more deterministic. An early iteration of the "Fix out-of-order keystrokes" patch series had a bug where it would prevent native processes from receiving _any_ keystrokes under certain circumstances. Let's also specifically verify that this is _not_ the case, and prevent regressing on it. Takashi Yano's "Add workaround for handling of backspace when pcon enabled" patch works around a conhost.exe bug where byte 0x08 (Ctrl+H) is mapped to a Ctrl+Backspace key event, which performs word-wise deletion instead of single-character deletion. When asked how the bug was originally discovered (https://inbox.sourceware.org/cygwin-patches/c4dc071d-fa7e-ed2e-0c14-3fddb5240f1c@gmx.de/), Takashi explained that Ctrl+H on cmd.exe running in pseudo console erases a word, not a character, on Windows 11 (https://inbox.sourceware.org/cygwin-patches/20260328191514.360fed717ef42a086bac019b@nifty.ne.jp/). This was confirmed in a MinTTY session: launching cmd.exe, typing "abc" and pressing Ctrl+H deletes all three characters instead of just "c" (https://inbox.sourceware.org/cygwin-patches/463c3df7-3810-ed9a-9f7c-c2cf4fd6a7b7@gmx.de/). Add a verification step inside the existing cmd.exe test phase: after confirming the long test string arrived unjumbled, type "echo Expresso" followed by Ctrl+H and Enter. If Ctrl+H correctly deletes only the trailing "o", cmd.exe executes "echo Express" and prints "Express". If conhost.exe mistranslates the keypress into Ctrl+Backspace, the entire word "Expresso" is erased, cmd.exe runs bare "echo" and prints "ECHO is on." instead, causing the test to fail. Assisted-by: Claude Opus 4.6 Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Workaround certain anti-malware programs Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
The companion topic branch fixes a long-standing pcon usability bug that bit users in Git for Windows for years: launch cmd.exe from a mintty bash, run any Cygwin program inside cmd.exe, watch it exit normally, then try to keep typing in cmd.exe and find that nothing happens. The fix lives in winsup/cygwin/fhandler/pty.cc's open_setup() under the title "keep cmd.exe input alive after a Cygwin grandchild exits"; this test exercises exactly that scenario end-to-end. The script launches mintty (which spawns bash), then types "cmd.exe<Enter>" into bash to bring up cmd.exe under pseudo console. It runs "c:\PROGRA~1\Git\usr\bin\ls.exe --version" as the Cygwin grandchild, waits for the "GNU coreutils" banner to confirm ls actually ran, then types an "echo POST_GRANDCHILD_OK_XYZ123" at the cmd.exe prompt and asserts that the marker shows up twice in the captured buffer (once as the typed command, once as cmd.exe's echo output). Without the open_setup() fix the marker shows up zero times because cmd.exe's input pipe got torn down when the Cygwin slave closed. The test ships as a new ahk script and is wired into the existing ui-tests CI workflow next to ctrl-c.ahk and keystroke-order.ahk. The Git-for-Windows install path is hardcoded since the existing CI already assumes that layout (it replaces the runtime DLL at "c:/Program Files/Git/usr/bin/msys-2.0.dll" right at the top of the workflow); we use the 8.3 short name to dodge cmd.exe's space quoting rules. Assisted-by: Opus 4.7 Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
AI-assisted coding is a reality nowadays, as is the all-too-common practice to toss a task over the wall to an AI coding agent and accept its outcome without even bothering to verify. To get better results with either approach (explicitly avoiding to characterize the latter to be even remotely okay), let's add an AGENTS.md file to give AI a "leg up". Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Companion test for the topic-branch commit "Cygwin: pty: flush pcon input buffer on tcflush() when pcon is active". Before that fix discard_input() drained the Cygwin master-side pipes but left whatever was sitting in the pseudo console's own input buffer alone, so type-ahead during a non-cygwin foreground process survived a Ctrl-C and was processed by cmd.exe at the next prompt. The script reproduces it by typing into mintty while "ping -n 30 localhost" is running under cmd.exe: those bytes land in the pcon's input buffer (ping doesn't read stdin), then Ctrl-C kills ping and, with the fix in place, also clears the pcon buffer via FlushConsoleInputBuffer(). The test then types a separate "AFTER_FLUSH_OK" marker to prove cmd.exe is still alive (so a clean buffer can't be confused with a wedged shell), and asserts the earlier "TYPE_AHEAD_LEAKED" marker does not appear in the captured output. Wired into the same ui-tests workflow as the other tests. Assisted-by: Opus 4.7 Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Add a minimal `.github/dependabot.yml` that subscribes the `github-actions` ecosystem at the repository root to weekly Dependabot scans. With this enabled, Dependabot opens a pull request whenever any GitHub Action referenced in `.github/workflows/*.yml` publishes a new release. Without this configuration, Action versions in this fork's CI silently drift behind their upstream releases until somebody notices a deprecation warning or a behavior change in CI. Letting Dependabot file the PRs preserves the manual review step (the maintainer still decides whether to merge each individual bump) while removing the busywork of polling each action's release page. The configuration follows the GitHub Actions example at https://docs.github.com/en/code-security/dependabot/working-with-dependabot/keeping-your-actions-up-to-date-with-dependabot#enabling-dependabot-version-updates-for-actions verbatim with no extra options. Assisted-by: Claude Opus 4.7 Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Companion test for the topic-branch commit "Cygwin: pty: keep Ctrl-C and NOFLSH signal chars in the pcon input stream". cmd.exe's "Terminate batch job (Y/N)?" confirmation is driven by its own scan of stdin for the '\003' byte, not by the CTRL_C_EVENT that Cygwin's process_sigs() already synthesises; before the fix the byte was dropped on the way through master::write() and the prompt silently never appeared. The script creates a small looping batch file via bash, launches cmd.exe, runs the batch file, presses Ctrl-C, and asserts that "(Y/N)?" appears in the captured buffer. It then responds Y<Enter> to terminate the batch cleanly and verifies cmd.exe is back at its prompt before tearing down. Note the batch file is created with bash's printf using `r`n line endings so cmd.exe parses it correctly. Wired into the same ui-tests workflow as the other tests. Assisted-by: Opus 4.7 Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
One particularly important part of Git for Windows' MSYS2 runtime is that it is used to run Git's tests, and regressions have happened there. For example, the first iteration of MSYS2 runtime v3.5.5 caused plenty of hangs. This was realized unfortunately only after deploying the msys2-runtime Pacman package, and some painful vacation-time scrambling was required to revert to v3.5.4. To verify that this does not happen anymore, this commit reuses what `setup-git-for-windows-sdk` uses in Git's very own CI: determine the latest successful `ci-artifacts` workflow run in `git-for-windows/git-sdk-64`, download its Git files, build artifacts, and minimal SDK, overwrite the MSYS2 runtime in the minimal SDK with the just-built version, and then run Git's test suite and the assorted validations exactly as the `ci-artifacts` workflow runs them (and from which these jobs are copied). This obviously adds a hefty time penalty (around 7 minutes!) to every MSYS2 runtime PR in the git-for-windows org. Happily, these days we don't need many of those, and the balance between things like the v3.5.5 scramble and waiting a little longer for the CI to finish is clearly in favor of the latter. Co-authored-by: Jeremy Drake <github@jdrake.com> Assisted-by: Claude Opus 4.7 Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
This is a forked repository... Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
When native `git.exe` runs a `!` alias under `mintty`, it starts `sh.exe`, which may in turn launch another native program. A pseudo console regression made that program see standard input as redirected, causing console APIs such as `[Console]::KeyAvailable` to fail. The existing `mintty` grandchild-input test is the right home for a regression test to catch such a bug because it already launches an interactive `mintty` session and exercises native/Cygwin/native process chains, while the Git invocation itself exercises the relevant alias path. Keep the process chain attached to `mintty` and use PowerShell's file APIs to persist the observations. Shell redirection would replace Git's standard handles before pseudo console setup and mask the regression. Discard stale results so repeated local runs cannot pass spuriously. Assisted-by: GPT 5.6 Sol Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
ci: run Git's entire test suite
There have been way too many regressions in Cygwin as of late, in particular in the console handling. The worst part? Many of those bugs were introduced _in bug fix patches_! Here are a bunch of tests that are designed to help Git for Windows increase confidence in upgrades to newer Cygwin versions. Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
dscho
marked this pull request as ready for review
July 27, 2026 14:58
Member
Author
|
/open pr The workflow run was started |
In the latest version, binutils' BFD no longer declares a `bfd_boolean`,
and the `bfd_record_phdr()` function accepts plain `bool` parameters
instead.
Let's accommodate for that to avoid these build failures:
.../winsup/utils/dumper.cc: In member function 'int dumper::prepare_core_dump()':
.../winsup/utils/dumper.cc:830:7: error: 'bfd_boolean' was not declared in this scope; did you mean 'boolean'?
830 | bfd_boolean filehdr = 0;
| ^~~~~~~~~~~
| boolean
.../winsup/utils/dumper.cc:831:18: error: expected ';' before 'phdrs'
831 | bfd_boolean phdrs = 0;
| ^~~~~~
| ;
[...]
Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Member
Author
|
/open pr The workflow run was started |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Range-diff relative to main
52: b262a2e = 1: b9c4247 Cygwin: pty: detect pcon-backed pty for non-Cygwin-spawned children
53: b19003e = 2: 7a68b7c Cygwin: pty: Discard pcon input buffer when discard_input is called
54: 3f73902 ! 3: 1187e92 Cygwin: pty: Fixup pty state after a cygwin app exits
@@ winsup/cygwin/fhandler/pty.cc: err_no_msg: set_flags ((flags & ~O_TEXT) | O_BINARY); myself->set_ctty (this, flags); report_tty_counts (this, "opened", ""); -@@ winsup/cygwin/fhandler/pty.cc: fhandler_pty_slave::open_setup (int flags) - void - fhandler_pty_slave::cleanup () - { +@@ winsup/cygwin/fhandler/pty.cc: fhandler_pty_slave::cleanup () + while (arch->num_reader) + mask_switch_to_nat_pipe (false, false); + + if (get_ttyp ()->pcon_activated && get_ttyp ()->getpgid () == myself->pgid) + req_fixup_pcon_state (); +59: 03871de = 4: 12c0b81 Cygwin: pty: grow GetConsoleProcessList buffer in find_pcon_pty()
60: 8186453 = 5: 57fd3f6 Cygwin: pty: bound the cursor-sync round-trip so an exiting process cannot hang
61: 0a77769 = 6: 4250046 Cygwin: pty: do not leak nat handles when adopting the pcon's in open_setup()
62: ae34249 = 7: fc4fc3b Cygwin: pty: validate the cursor-position reply before moving the pcon cursor
-: ---------- > 8: 2105f6c fixup! CI: add a GHA for doing a basic build test
1: d399a0d ! 9: a362d1c fixup! Add functionality for converting UNIX paths in arguments and environment variables to Windows form for native Win32 applications.
69: 0eae379 = 10: b0d4659 Cygwin: pty: keep interactive console input for native programs via Cygwin
9: 4bd00d6 ! 11: 29862e4 Cygwin: CI: update Actions versions
@@ Metadata ## Commit message ## Cygwin: CI: update Actions versions - Essentially, all of these major version updates bump the requirements to - Node.JS 24. + Update both versioned actions in `cygwin.yml` to current major + versions: `actions/checkout` from v3 to v6 (in both invocations: + the Fedora cross-build job and the windows-2022 native build job) + and `actions/upload-artifact` from v4 to v6 (the "Upload test logs" + step that publishes the testsuite `*.log` and `*.trs` artifacts). + + All three call sites use the actions with default arguments, so the + bumps are behaviorally transparent: they exist purely to advance the + underlying Node.js runtime to v24 on the GitHub Actions runners and + to retire the v3/v4 deprecation warnings emitted on each workflow + run. + + Cygwin upstream's `cygwin.yml` still pins the older v3 and v4 + revisions. Carrying this bump in the Git for Windows fork keeps the + fork's CI clean ahead of upstream catching up at the next + merging-rebase. Originally-authored-by: dependabot[bot] <support@github.com> + Assisted-by: Claude Opus 4.7 Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de> ## .github/workflows/cygwin.yml ## @@ .github/workflows/cygwin.yml: jobs: steps: - - uses: actions/checkout@v3 -+ - uses: actions/checkout@v6 ++ - uses: actions/checkout@v7 # install build tools - name: Install build tools @@ .github/workflows/cygwin.yml: jobs: icacls . /inheritance:r icacls . /grant Administrators:F - - uses: actions/checkout@v3 -+ - uses: actions/checkout@v6 ++ - uses: actions/checkout@v7 # install cygwin and build tools - name: Install Cygwin @@ .github/workflows/cygwin.yml: jobs: # upload test logs to facilitate investigation of problems - name: Upload test logs - uses: actions/upload-artifact@v4 -+ uses: actions/upload-artifact@v6 ++ uses: actions/upload-artifact@v7 with: name: testlogs path: |2: 1c925ce = 12: 9810104 Mention the extremely useful small_printf() function
3: 23d0d08 = 13: 52cca5b Allow native symlinks to non-existing targets in 'nativestrict' mode
4: 38393ae = 14: e72f778 WIP Handle 8-bit characters under LOCALE=C
5: 18a5a8a = 15: de839b5 Make paths' WCS->MBS conversion explicit
6: 28130fd = 16: 12b2da4 msys2-runtime: restore fast path for current user primary group
7: 5e1d3bf = 17: 370e5af Change the default base address for x86_64
8: 53b3656 = 18: f45cc10 Add AGENTS.md with comprehensive project context for AI agents
10: b72ad68 < -: ---------- fixup! CI: add a GHA for doing a basic build test
11: 9e748a0 < -: ---------- fixup! CI: add a GHA for doing a basic build test
12: 11e29af ! 19: 5b98d41 dependabot: help keeping GitHub Actions versions up to date
@@ Metadata ## Commit message ## dependabot: help keeping GitHub Actions versions up to date - See https://docs.github.com/en/code-security/dependabot/working-with-dependabot/keeping-your-actions-up-to-date-with-dependabot#enabling-dependabot-version-updates-for-actions for details. + Add a minimal `.github/dependabot.yml` that subscribes the + `github-actions` ecosystem at the repository root to weekly + Dependabot scans. With this enabled, Dependabot opens a pull + request whenever any GitHub Action referenced in + `.github/workflows/*.yml` publishes a new release. + Without this configuration, Action versions in this fork's CI + silently drift behind their upstream releases until somebody + notices a deprecation warning or a behavior change in CI. Letting + Dependabot file the PRs preserves the manual review step (the + maintainer still decides whether to merge each individual bump) + while removing the busywork of polling each action's release page. + + The configuration follows the GitHub Actions example at + https://docs.github.com/en/code-security/dependabot/working-with-dependabot/keeping-your-actions-up-to-date-with-dependabot#enabling-dependabot-version-updates-for-actions + verbatim with no extra options. + + Assisted-by: Claude Opus 4.7 Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de> ## .github/dependabot.yml (new) ##13: c18d12c = 20: 177812c Do not try to sync with Cygwin
14: a85ceb4 ! 21: 80bb4c0 ci: run Git's entire test suite
@@ Metadata ## Commit message ## ci: run Git's entire test suite - One particularly important part of Git for Windows' MSYS2 runtime is - that it is used to run Git's tests, and regressions happened there: For - example, the first iteration of MSYS2 runtime v3.5.5 caused plenty of - hangs. This was realized unfortunately only after deploying the - msys2-runtime Pacman package, and some painful vacation-time scrambling - was required to revert to v3.5.4.This was realized unfortunately only - after deploying the msys2-runtime Pacman package, and some painful - vacation-time scrambling was required to revert to v3.5.4. + One particularly important part of Git for Windows' MSYS2 runtime + is that it is used to run Git's tests, and regressions have + happened there. For example, the first iteration of MSYS2 runtime + v3.5.5 caused plenty of hangs. This was realized unfortunately + only after deploying the msys2-runtime Pacman package, and some + painful vacation-time scrambling was required to revert to v3.5.4. - To verify that this does not happen anymore, let's reuse what - `setup-git-for-windows-sdk` uses in Git's very own CI: + To verify that this does not happen anymore, this commit reuses + what `setup-git-for-windows-sdk` uses in Git's very own CI: + determine the latest successful `ci-artifacts` workflow run in + `git-for-windows/git-sdk-64`, download its Git files, build + artifacts, and minimal SDK, overwrite the MSYS2 runtime in the + minimal SDK with the just-built version, and then run Git's test + suite and the assorted validations exactly as the `ci-artifacts` + workflow runs them (and from which these jobs are copied). - - determine the latest successful `ci-artifacts` workflow run in - git-for-windows/git-sdk-64 - - - download its Git files and build artifacts - - - download its minimal-sdk - - - overwrite the MSYS2 runtime in the minimal-sdk - - - run the test suite and the assorted validations just like the - `ci-artifacts` workflow (from which these jobs are copied) - - This obviously adds a hefty time penalty (around 7 minutes!) to every - MSYS2 runtime PR in the git-for-windows org. Happily, these days we - don't need many of those, and the balance between things like the v3.5.5 - scramble and waiting a little longer for the CI to finish is clearly in - favor of the latter. + This obviously adds a hefty time penalty (around 7 minutes!) to + every MSYS2 runtime PR in the git-for-windows org. Happily, these + days we don't need many of those, and the balance between things + like the v3.5.5 scramble and waiting a little longer for the CI to + finish is clearly in favor of the latter. Co-authored-by: Jeremy Drake <github@jdrake.com> + Assisted-by: Claude Opus 4.7 Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de> ## .github/workflows/build.yaml ## @@ .github/workflows/build.yaml: jobs: + # Cannot just grab from https://github.com/git-for-windows/git-sdk-64/releases/tag/ci-artifacts + # because we also need the git-artifacts + id: ci-artifacts-run-id -+ uses: actions/github-script@v8 ++ uses: actions/github-script@v9 + with: + script: | + const [ owner, repo ] = process.env.G4W_SDK_REPO.split('/') @@ .github/workflows/build.yaml: jobs: + owner, + repo, + workflow_id: 938271, // ci-artifacts.yml ++ branch: 'main', + status: 'success', + per_page: 1 + }) @@ .github/workflows/build.yaml: jobs: + exit $? + done + ls -la -+ - uses: actions/download-artifact@v7 ++ - uses: actions/download-artifact@v8 + with: + name: install + path: install @@ .github/workflows/build.yaml: jobs: + tar -C ../install -cf - . | tar xf - && + tar cvf - * .[0-9A-Za-z]* | gzip -1 >../git-sdk-x86_64-minimal.tar.gz + - name: upload minimal-sdk artifact -+ uses: actions/upload-artifact@v6 ++ uses: actions/upload-artifact@v7 + with: + name: minimal-sdk + path: git-sdk-x86_64-minimal.tar.gz @@ .github/workflows/build.yaml: jobs: + echo "result=$(tar Oxf git-artifacts.tar.gz git/bin-wrappers/git | + sed -n 's|^GIT_EXEC_PATH='\''\(.*\)/git'\''$|\1|p')" >>$GITHUB_OUTPUT + - name: upload git artifacts for testing -+ uses: actions/upload-artifact@v6 ++ uses: actions/upload-artifact@v7 + with: + name: git-artifacts + path: git-artifacts.tar.gz15: 7eb77ae ! 22: adf0787 Start implementing UI-based tests by adding an AutoHotKey library
@@ Commit message So let's start by adding a library of useful functions, to be extended as needed. + Note: As AutoHotKey is a GUI application, it does not expect to have + stdout/stderr attached to it, therefore the `Info()` function added in + this commit writes all the messages into `.log` files adjacent to the + per-test working directories. But AutoHotKey _can_ have stdout/stderr + attached to it, via redirection. In PowerShell, for example, appending + `| Out-Default` to the invocation will make stdout/stderr available to + AutoHotKey scripts (via the unintuitive syntax `FileAppend "text`n", + "*"` (and `"**"` for stderr). The `Info()` function will detect when + stdout is available and if it is, will also write to it, in addition to + the `.log` file. + Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de> ## ui-tests/ui-test-library.ahk (new) ## @@ ui-tests/ui-test-library.ahk (new) +} + +Info(text) { ++ global workTree, cannotWriteToStdout + FileAppend text '`n', workTree '.log' ++ if !IsSet(cannotWriteToStdout) ++ { ++ try ++ FileAppend text '`n', '*' ++ catch as e { ++ if e.__Class == 'OSError' && e.Number == 6 ++ cannotWriteToStdout:= false ++ else ++ throw e ++ } ++ } +} + +closeWindow := false @@ ui-tests/ui-test-library.ahk (new) + while true + { + capturedText := CaptureBufferFromWindowsTerminal(winTitle) -+ if RegExMatch(capturedText, regex) -+ break ++ if RegExMatch(capturedText, regex, &matchObj) ++ { ++ Info(successMessage) ++ return matchObj ++ } + Sleep 100 + if A_TickCount > timeout { + Info('Captured text:`n' . capturedText) + ExitWithError errorMessage + } + } -+ Info(successMessage) +} \ No newline at end of file16: 2a344f8 < -: ---------- Start implementing UI-based tests by adding an AutoHotKey library
17: ae49b26 ! 23: a5b756b01a ci: add an AutoHotKey-based integration test
@@ .github/workflows/ui-tests.yml (new) + + runs-on: ${{ matrix.os }} + steps: -+ - uses: actions/download-artifact@v7 ++ - uses: actions/download-artifact@v8 + with: + name: ${{ inputs.msys2-runtime-artifact-name }} + path: ${{ runner.temp }}/artifacts @@ .github/workflows/ui-tests.yml (new) + $p = Get-ChildItem -Recurse "${env:RUNNER_TEMP}\artifacts" | where {$_.Name -eq "msys-2.0.dll"} | Select -ExpandProperty VersionInfo | Select -First 1 -ExpandProperty FileName + cp $p "c:/Program Files/Git/usr/bin/msys-2.0.dll" + -+ - uses: actions/checkout@v6 ++ - uses: actions/checkout@v7 + with: + sparse-checkout: | + ui-tests + -+ - uses: actions/cache/restore@v5 ++ - uses: actions/cache/restore@v6 + id: restore-wt + with: + key: wt-${{ env.WT_VERSION }} @@ .github/workflows/ui-tests.yml (new) + working-directory: ui-tests + run: | + powershell -File setup-portable-wt.ps1 -WtVersion $env:WT_VERSION -DestDir $env:RUNNER_TEMP -+ - uses: actions/cache/save@v5 ++ - uses: actions/cache/save@v6 + if: steps.restore-wt.outputs.cache-hit != 'true' + with: + key: wt-${{ env.WT_VERSION }} + path: ${{ runner.temp }}/wt.zip -+ - uses: actions/cache/restore@v5 ++ - uses: actions/cache/restore@v6 + id: restore-ahk + with: + key: ahk-${{ env.AUTOHOTKEY_VERSION }} @@ .github/workflows/ui-tests.yml (new) + run: | + curl -L -o "$RUNNER_TEMP/ahk.zip" \ + https://github.com/AutoHotkey/AutoHotkey/releases/download/v$AUTOHOTKEY_VERSION/AutoHotkey_$AUTOHOTKEY_VERSION.zip -+ - uses: actions/cache/save@v5 ++ - uses: actions/cache/save@v6 + if: steps.restore-ahk.outputs.cache-hit != 'true' + with: + key: ahk-${{ env.AUTOHOTKEY_VERSION }} @@ .github/workflows/ui-tests.yml (new) + mkdir -p "$RUNNER_TEMP/ahk" && + "$WINDIR/system32/tar.exe" -C "$RUNNER_TEMP/ahk" -xf "$RUNNER_TEMP/ahk.zip" && + cygpath -aw "$RUNNER_TEMP/ahk" >>$GITHUB_PATH -+ - uses: actions/setup-node@v6 # the hook uses node for the background process -+ ++ - uses: actions/setup-node@v7 # the hook uses node for the background process + - name: Run UI tests + id: ui-tests + timeout-minutes: 1018: c695b96 ! 24: 958a63a4de ci(ui-tests): upload the test logs
@@ .github/workflows/ui-tests.yml: jobs: run: type bg-hook.log + - name: Upload test results + if: always() -+ uses: actions/upload-artifact@v6 ++ uses: actions/upload-artifact@v7 + with: + name: ui-tests-${{ matrix.os }} + path: ui-tests19: 98f3ccf ! 25: b4bbe416b7 ci(ui-tests): take a screenshot when canceled
@@ .github/workflows/ui-tests.yml: jobs: + screenshot $bounds "ui-tests/screenshot.png" - name: Upload test results if: always() - uses: actions/upload-artifact@v6 + uses: actions/upload-artifact@v720: 2886c18 ! 26: 0fcee187bb ui-tests: verify that a
sleepin Windows Terminal can be interrupted21: da7e846 ! 27: 86c5d389d7 ui-tests: verify that interrupting clones via SSH works
@@ .github/workflows/ui-tests.yml: on: @@ .github/workflows/ui-tests.yml: jobs: "$WINDIR/system32/tar.exe" -C "$RUNNER_TEMP/ahk" -xf "$RUNNER_TEMP/ahk.zip" && cygpath -aw "$RUNNER_TEMP/ahk" >>$GITHUB_PATH - - uses: actions/setup-node@v6 # the hook uses node for the background process -+ - uses: actions/cache/restore@v5 + - uses: actions/setup-node@v7 # the hook uses node for the background process ++ - uses: actions/cache/restore@v6 + id: restore-win32-openssh + with: + key: win32-openssh-${{ env.WIN32_OPENSSH_VERSION }} @@ .github/workflows/ui-tests.yml: jobs: + run: | + curl -fLo "$RUNNER_TEMP/win32-openssh.zip" \ + https://github.com/PowerShell/Win32-OpenSSH/releases/download/v$WIN32_OPENSSH_VERSION/OpenSSH-Win64.zip -+ - uses: actions/cache/save@v5 ++ - uses: actions/cache/save@v6 + if: steps.restore-win32-openssh.outputs.cache-hit != 'true' + with: + key: win32-openssh-${{ env.WIN32_OPENSSH_VERSION }} @@ .github/workflows/ui-tests.yml: jobs: + run: | + "$WINDIR/system32/tar.exe" -C "$RUNNER_TEMP" -xvf "$RUNNER_TEMP/win32-openssh.zip" && + echo "OPENSSH_FOR_WINDOWS_DIRECTORY=$(cygpath -aw "$RUNNER_TEMP/OpenSSH-Win64")" >>$GITHUB_ENV - - name: Run UI tests id: ui-tests + timeout-minutes: 10 +@@ .github/workflows/ui-tests.yml: jobs: + $screen = [System.Windows.Forms.Screen]::PrimaryScreen + $bounds = [Drawing.Rectangle]::FromLTRB(0, 0, $screen.Bounds.Width * $dpi / 96, $screen.Bounds.Height * $dpi / 96) + screenshot $bounds "ui-tests/screenshot.png" ++ - name: Stop SSH server ++ if: always() ++ shell: powershell ++ run: | ++ Get-Process sshd -ErrorAction SilentlyContinue | ++ ForEach-Object { Stop-Process -Id $_.Id -Force -ErrorAction SilentlyContinue } + - name: Upload test results + if: always() + uses: actions/upload-artifact@v7 ## ui-tests/ctrl-c.ahk ## @@ ui-tests/ctrl-c.ahk: Sleep 150 @@ ui-tests/ctrl-c.ahk: Sleep 150 + ExitWithError 'Could not add admin read permission from ' . path . ': ' A_LastError + } + ++ WaitForSshd() { ++ deadline := A_TickCount + 60000 ++ while true { ++ if FileExist('sshd.pid') { ++ content := '' ++ try ++ content := Trim(FileRead('sshd.pid'), ' `t`r`n') ++ if content != '' { ++ Info('sshd is accepting connections (PID ' . content . ')') ++ return ++ } ++ } ++ if A_TickCount > deadline ++ ExitWithError 'sshd did not write its PidFile within 60 seconds' ++ Sleep 500 ++ } ++ } ++ + ; Set up SSH server + Info('Generating host key') + RunWait('git -c alias.c="!ssh-keygen -b 4096 -f ssh_host_rsa_key -N \"\"" c', '', 'Hide') @@ ui-tests/ctrl-c.ahk: Sleep 150 + AdjustPermissions('id_rsa.pub') + FileAppend('Port 2322`n' . + 'HostKey "' . workTree . '\ssh_host_rsa_key"`n' . -+ 'AuthorizedKeysFile "' . workTree . '\id_rsa.pub"`n', ++ 'AuthorizedKeysFile "' . workTree . '\id_rsa.pub"`n' . ++ 'LogLevel VERBOSE`n' . ++ 'PidFile "' . workTree . '\sshd.pid"`n', + 'sshd_config') -+ sshdOptions := '-f "' . workTree . '\sshd_config" -D -d -d -d -E sshd.log' ++ sshdOptions := '-f "' . workTree . '\sshd_config" -D -E "' . workTree . '\sshd.log"' + + ; Start SSH server + Info('Starting SSH server') @@ ui-tests/ctrl-c.ahk: Sleep 150 + ; `ssh.exe` prefixes the username with the domain name. + cloneOptions := '--upload-pack="powershell git upload-pack" ' . + EnvGet('USERNAME') . '@localhost:' . workTree . '\large.git large-clone' ++ WaitForSshd() + Send('git -c core.sshCommand="ssh ' . sshOptions . '" clone ' . cloneOptions . '{Enter}') + Sleep 50 + Info('Waiting for clone to start') + WinActivate('ahk_id ' . hwnd) -+ WaitForRegExInWindowsTerminal('remote: ', 'Timed out waiting for clone to start', 'Clone started', 5000, 'ahk_id ' . hwnd) ++ WaitForRegExInWindowsTerminal('remote: ', 'Timed out waiting for clone to start', 'Clone started', 15000, 'ahk_id ' . hwnd) + Info('Trying to interrupt clone') + Send('^C') ; interrupt clone + Sleep 150 @@ ui-tests/ctrl-c.ahk: Sleep 150 + + if DirExist(workTree . '\large-clone') + ExitWithError('`large-clone` was unexpectedly not deleted on interrupt') ++ ++ for proc in ComObjGet('winmgmts:').ExecQuery('SELECT ProcessId, Name, ExecutablePath FROM Win32_Process WHERE Name LIKE "sshd%.exe"') { ++ if (proc.ExecutablePath != '' and InStr(proc.ExecutablePath, openSSHPath) > 0) { ++ Info('Stopping ' . proc.Name . ' (PID ' . proc.ProcessId . ')') ++ try { ++ ProcessClose proc.ProcessId ++ ProcessWaitClose proc.ProcessId, 5 ++ } ++ } ++ } +} + Send('exit{Enter}')22: e409d12 ! 28: 3253e75629 ci(ui-tests): exclude the large repository from the build artifact
@@ ui-tests/ctrl-c.ahk: if (openSSHPath != '' and FileExist(openSSHPath . '\sshd.ex - EnvGet('USERNAME') . '@localhost:' . workTree . '\large.git large-clone' + cloneOptions := '--upload-pack="powershell git upload-pack" "' . + EnvGet('USERNAME') . '@localhost:' . largeGitRepoPath . '" "' . largeGitClonePath . '"' + WaitForSshd() Send('git -c core.sshCommand="ssh ' . sshOptions . '" clone ' . cloneOptions . '{Enter}') Sleep 50 - Info('Waiting for clone to start') @@ ui-tests/ctrl-c.ahk: if (openSSHPath != '' and FileExist(openSSHPath . '\sshd.exe')) { Sleep 150 WaitForRegExInWindowsTerminal('`nfatal: (.*`r?`n){1,3}PS .*>[ `n`r]*$', 'Timed out waiting for clone to be interrupted', 'clone was interrupted as desired') @@ ui-tests/ctrl-c.ahk: if (openSSHPath != '' and FileExist(openSSHPath . '\sshd.ex - if DirExist(workTree . '\large-clone') + if DirExist(largeGitClonePath) ExitWithError('`large-clone` was unexpectedly not deleted on interrupt') - } + for proc in ComObjGet('winmgmts:').ExecQuery('SELECT ProcessId, Name, ExecutablePath FROM Win32_Process WHERE Name LIKE "sshd%.exe"') {23: d5fc7e3 ! 29: caff96ffdf ui-tests: add
pinginterrupt test@@ ui-tests/ctrl-c.ahk: Sleep 150 +; ping test (`cat.exe` should be interrupted, too) +Send('git -c alias.c="{!}cat | /c/windows/system32/ping -t localhost" c{Enter}') +Sleep 500 -+WaitForRegExInWindowsTerminal('Pinging ', 'Timed out waiting for pinging to start', 'Pinging started') ++WaitForRegExInWindowsTerminal('Pinging ', 'Timed out waiting for pinging to start', 'Pinging started', 10000) +Send('^C') ; interrupt ping and cat +Sleep 150 +; Wait for the `^C` tell-tale to appear24: 4c45848 < -: ---------- ui-tests: do verify the SSH hang fix
75: 55abf76 ! 30: c1c7c8c7af fixup! ui-tests: do verify the SSH hang fix
25: 60ce8df ! 31: cbcfaca2fa ui-tests: minimize Log window
26: 84b13c6 = 32: ff49785531 ui-tests: add mintty launch and capture helpers to the library
27: 78fbb85 = 33: 3e7f8e8139 ui-tests: add a reproducer for the keystroke reordering bug
28: c0a4d63 < -: ---------- amend! Cygwin: CI: update Actions versions
29: 8261c5f < -: ---------- fixup! Cygwin: CI: update Actions versions
30: fa25a31 < -: ---------- amend! b72ad68
31: d19d4bd < -: ---------- amend! 9e748a0
32: b6fdf01 < -: ---------- fixup! CI: add a GHA for doing a basic build test
33: 8421a39 < -: ---------- fixup! ci: run Git's entire test suite
34: ef2dc42 < -: ---------- fixup! ci: add an AutoHotKey-based integration test
35: 6c5e11a < -: ---------- fixup! ci(ui-tests): upload the test logs
36: 1f7279c < -: ---------- amend! dependabot: help keeping GitHub Actions versions up to date
37: bdbb258 < -: ---------- amend! ci: run Git's entire test suite
38: fc2528f (upstream: 9a6cbe5) < -: ---------- cygcheck: remove an unused variable causing a build error with GCC 16
39: f2d12f5 < -: ---------- CI: add missing libzstd-devel
40: ef72003 < -: ---------- fixup! ui-tests: add
pinginterrupt test41: 7261157 < -: ---------- fixup! ui-tests: verify that interrupting clones via SSH works
42: 01d6c70 (upstream: d541ca7) < -: ---------- Cygwin: console: fix deadlock in pcon teardown
43: f1f427f < -: ---------- build(deps): bump actions/checkout from 6 to 7
44: e602a81 (upstream: cad596e) < -: ---------- Cygwin: pty: Do not set input_available_event when applying line_edit()
45: 4e7ce5b (upstream: 4060cf3) < -: ---------- Cygwin: pty: Introduce a helper function get_handle_from_process()
46: 861d02c (upstream: 1c5c82a) < -: ---------- Cygwin: pty: Prevent unintended conversion for cursor position report
47: c3c0c93 (upstream: a828b4e) < -: ---------- Cygwin: pty: Fix race issue between starting and exiting non-cygwin apps
48: 6b7d9c3 (upstream: f2faf90) < -: ---------- Cygwin: pty: Treat CR/NL in accept_input() the same as in transfer_input()
49: a03ae62 (upstream: 4fb9073) < -: ---------- Cygwin: console: Ensure the master thread runs only when it is supposed to
50: 231c43b (upstream: 56dfa4d) < -: ---------- Cygwin: console: Fix NOFLSH behaviour a bit
51: 8a1531a (upstream: c92d801) < -: ---------- Cygwin: console: Fix typeahead input for bash
55: ee50bdd (upstream: 36f40c9) < -: ---------- Cygwin: console: re-enable the master thread before selecting cygwin input mode
56: 6f27a39 (upstream: c313089) < -: ---------- Cygwin: console: Correct previous NOFLSH fix
57: 8023568 (upstream: fa1e820) < -: ---------- Cygwin: pty: Do not transfer input to nat-pipe while masked
58: cd93f4a (upstream: fb1d831) < -: ---------- Cygwin: pty: Fix nat_pipe_owner_pid when gdb runs non-cygwin app
63: ae66497 = 34: 4a0d02f50a ui-tests: reproduce "cmd.exe input dies after Cygwin grandchild exit"
64: 4572966 = 35: ad7d577605 ui-tests: reproduce "tcflush() doesn't actually flush pcon input"
65: 9a59090 = 36: a37211ce3d ui-tests: reproduce "cmd.exe doesn't see Ctrl-C in its input stream"
66: 0a23382 < -: ---------- fixup! ui-tests: verify that a
sleepin Windows Terminal can be interrupted67: 33e55c4 < -: ---------- fixup! ui-tests: verify that interrupting clones via SSH works
68: b7e7803 < -: ---------- fixup! ui-tests: verify that interrupting clones via SSH works
70: 82b89f8 = 37: 9322fe9098 ui-tests: catch redirected console input through native Git aliases
71: ea9f8c4 < -: ---------- fixup! ui-tests: do verify the SSH hang fix
72: a001d7d < -: ---------- fixup! ui-tests: do verify the SSH hang fix
73: 66105ea < -: ---------- fixup! ui-tests: do verify the SSH hang fix
74: ca2f394 < -: ---------- fixup! ui-tests: do verify the SSH hang fix
The only three changes I snuck in that weren't in
mainbefore: #136, #139 and that the last successfulci-artifactsrun ingit-sdk-64is now limited to themainbranch (lest theucrt64run is used instead and the check for/mingw64/bin/gccfails because/ucrt64/bin/gccis found instead).