NAME
LibTmux::Transport - Supervised literal process execution
METHODS
run
run(argv => [...], stdin => $octets, timeout => $seconds, max_output => $bytes, cancel_fh => $handle) returns a LibTmux::CommandResult. Stdout/stderr are separate octet strings. Nonzero exits are results; spawn, timeout, cancellation, output limits, and supervision failures throw LibTmux::X exceptions. timeout bounds one command's execution loop, excluding supervisor setup, async queue waiting, and separate cleanup time.
start
Return a LibTmux::ProcessJob for an executor adapter.
RESULTS
LibTmux::CommandResult exposes stdout, stderr, exit_code, signal, raw_status, and success. Output remains octets.
The private supervisor owns program signals/groups and reaps the program. It receives CHLD, INT and TERM through a Linux signal descriptor, so child exit cannot wait for a deferred Perl handler. This mask belongs only to the supervisor; the command restores its inherited mask before execution. Application SIGCHLD handlers remain intact; SIGCHLD=IGNORE is refused. Cancellation handles are borrowed and remain open. Cancellation after release can have effects and never implies rollback. Parent death triggers cleanup.
Owned supervisor and command branches close unrelated inherited descriptors through Linux /proc/self/fd, preserving the caller's handles. Native descriptors without close-on-exec cannot leak into a newly started tmux daemon. Only standard streams and each branch's required protocol/cancellation pipes remain open. Enumeration or closure failures prevent execution and throw "Transport" in LibTmux::X or "Spawn" in LibTmux::X. No arbitrary descriptor-passing API is selected. Forking hosts with native threads remains unqualified.