fix(doctor): pin the probes' stdin — an interactive exec cannot be timed out #42

Merged
dan-claude-bot merged 1 commit from fix/doctor-probe-hangs into main 2026-07-14 11:54:37 +00:00

1 commit

Author SHA1 Message Date
claude-hdb
2ab3ac8244 fix(doctor): pin the probes' stdin — an interactive exec cannot be timed out
With a TTY on stdin, 'incus exec' goes interactive and puts the terminal
in raw mode. The DNS probes then hang forever: timeout's bare TERM never
lands (no -k escalation), and ^C is forwarded into the box as a keystroke
instead of killing the script. Observed live: doctor hung 15+ minutes at
'Can a box actually resolve DNS?' and survived Ctrl-C; the operator had
to kill the shell.

The drill already learned this exact lesson in #22 (exec_in pins stdin
and uses 'timeout -k'); the doctor's probe section was added later in
#34/#35 and never got the cure. All four probes now pin stdin to
/dev/null and escalate to SIGKILL.
2026-07-14 11:50:08 +00:00