Documentation
¶
Overview ¶
Package execx provides explicit helpers for spawning subprocesses with a chosen TTY attachment mode, replacing env-var signalling with real OS state.
Use NonInteractive when the subprocess must not prompt (tests, automation, hooks that shouldn't block). Use Interactive when the subprocess should inherit the parent's controlling TTY (the default for exec.Command).
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Interactive ¶
Interactive returns an *exec.Cmd that inherits the parent's controlling TTY. Equivalent to exec.CommandContext; provided for symmetry and intent clarity.
func NonInteractive ¶
NonInteractive returns an *exec.Cmd detached from the parent's controlling TTY. In the child, /dev/tty cannot be opened, so interactive.CanPromptInteractively() returns false — no env var required.
On Windows the child runs with DETACHED_PROCESS | CREATE_NEW_PROCESS_GROUP so it has no inherited console.
Types ¶
This section is empty.