Documentation
¶
Overview ¶
Package tty answers one narrow question about a controlling terminal: is its line discipline canonical (line-buffered, "cooked") or raw. The shell-activity poller (internal/server/shellactivity.go) uses this to tell a program waiting for the user (raw mode — zsh's zle, readline, vim, Claude Code's trust prompt) from one doing batch work (canonical) — kb:adr/surfaces-shell-busy-from-tmux-process-state. This is a BSD ioctl (TIOCGETA); Muster is macOS-only (CLAUDE.md), so no other platform is supported.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func IsCanonical ¶
IsCanonical opens ttyPath read-only and reports whether ICANON is set on its line discipline via a TIOCGETA ioctl. O_NONBLOCK keeps the open from waiting on a device with nothing ready; O_NOCTTY keeps this process from acquiring ttyPath as its own controlling terminal. Measured not to disturb the shell process already attached to the tty.
Types ¶
This section is empty.