From 1bc953d34295ff4e9ea9f2d131dc7ec5e1977141 Mon Sep 17 00:00:00 2001 From: teknium1 <127238744+teknium1@users.noreply.github.com> Date: Fri, 18 Sep 2026 23:07:54 -0700 Subject: [PATCH] docs(terminal): name the stdin=DEVNULL atom of the Git Bash probe (#73403) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Review follow-up: the comment in _bash_starts now says why stdin=DEVNULL matters beyond the bounded cleanup — cygwin init's handle_to_fn/NtQueryObject stalls on a pipe file object that has a read pending (the ACP host's stdin), which is why the probe blew its timeout inside ACP hosts — and why stderr stays captured (the Mandatory-ASLR remediation keys off bash's dofork:/child_copy: text). --- tools/environments/local_gitbash_probe.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/tools/environments/local_gitbash_probe.py b/tools/environments/local_gitbash_probe.py index 1d54ef1977..e8da670dc2 100644 --- a/tools/environments/local_gitbash_probe.py +++ b/tools/environments/local_gitbash_probe.py @@ -93,6 +93,11 @@ def _bash_starts(bash: str) -> bool: # killed bash holding the pipe write ends — the ACP host then wedged for minutes (#73403). # The probe's tree is killed and the drain bounded, so a slow host fails the probe fast # and _find_bash falls through to its last-resort candidate instead of hanging. + # stdin=DEVNULL (inside bounded_probe_run) is also what keeps the probe off the ACP + # host's stdin pipe: cygwin init's handle_to_fn/NtQueryObject stalls ~22 s on a pipe + # file object with a read pending on it, and the host's stdin reader always has one + # (@Aaaarminn's strace on #73403). stderr stays captured: the Mandatory-ASLR + # remediation keys off bash's dofork:/child_copy: text. result = bounded_probe_run( [bash, "--noprofile", "--norc", "-c", _BASH_EXTERNAL_PROGRAM_PROBE], timeout=_BASH_PROBE_TIMEOUT, raise_on_spawn_failure=True)