a73x

2f9e9835

fix: the xos preflight ssh takes -n, so a tty on stdin cannot stop it

a73x   2026-09-04 10:48

Commit message
fix: the xos preflight ssh takes -n, so a tty on stdin cannot stop it

`timeout` runs its child in a background process group, and an ssh with
no -n reads its stdin to forward it. Run from a terminal, that read is a
background read of the tty: the kernel stops ssh with SIGTTIN, and the
SIGTERM timeout sends at 20 s cannot land on a stopped process, so the
gate sat for 17 minutes on `uname -m` (found 2026-09-04 running demo.sh
from a prompt). Every earlier run had a pipe on stdin, which is why it
was green three times. The two script-carrying helpers already feed ssh
from a pipe; this was the one bare site.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01SakwJEwD9dXBoRP5kWbemW

test/xos.sh
Old New
@@ -319,7 +319,7 @@ if printf '%s\n' "$MPRE" | grep -qx 'cfg=absent'; then MAC_CFG_MADE=yes; fi
319 # ~/.local/bin; the line goes ABOVE bashrc's interactivity 319 # ~/.local/bin; the line goes ABOVE bashrc's interactivity
320 # return, where Debian's ssh-aware bash reads it. 320 # return, where Debian's ssh-aware bash reads it.
321 # shellcheck disable=SC2086 # SSH_OPTS is words on purpose 321 # shellcheck disable=SC2086 # SSH_OPTS is words on purpose
322 LAN_ARCH=$(timeout 20 ssh $SSH_OPTS "$LAN" 'uname -m') || 322 LAN_ARCH=$(timeout 20 ssh -n $SSH_OPTS "$LAN" 'uname -m') ||
323 fail reset "cannot ssh to $LAN — is the VM up, and has its DHCP lease moved?" 323 fail reset "cannot ssh to $LAN — is the VM up, and has its DHCP lease moved?"
324 [ "$LAN_ARCH" = "x86_64" ] || 324 [ "$LAN_ARCH" = "x86_64" ] ||
325 fail reset "$LAN is $LAN_ARCH, and this gate installs an x86_64-musl build there" 325 fail reset "$LAN is $LAN_ARCH, and this gate installs an x86_64-musl build there"