attach-smoke

command
v0.5.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 14, 2026 License: Apache-2.0 Imports: 8 Imported by: 0

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

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL