Documentation
¶
Overview ¶
attach-smoke drives an interactive subprocess attached to a freshly allocated pseudoterminal, then sends sbsh's Ctrl+] Ctrl+] detach sequence and waits for the child to exit. It exists so scripts/dev-init.sh can smoke-test `kuke attach` without an expect(1) prereq; the helper reuses github.com/creack/pty (already a direct dependency).
Behaviour mirrors the prior expect block:
- allocate a PTY and spawn the child connected to it
- sleep --connect-grace (default 2s) so the pkg/attach raw-mode keyboard filter wires up before keystrokes arrive
- write 0x1d 0x1d (Ctrl+] Ctrl+]) to the PTY master
- wait up to --exit-timeout (default 20s) for the child to exit
- exit non-zero on timeout or non-zero child exit; the child's transcript is always captured to --log
Click to show internal directories.
Click to hide internal directories.