Transport
Supervised literal process execution
Source and package
- Qualified name
-
LibTmux:: Transport - Module
- LibTmux
- Package
- LibTmux
- Source
- packages/core/lib/LibTmux/Transport.pm
- package Lib
Tmux:: ;Transport -
Description#
RESULTS
LibTmux::CommandResultexposes 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::Xor"Spawn" in LibTmux::X. No arbitrary descriptor-passing API is selected. Forking hosts with native threads remains unqualified.
Members2#
- run method
run(argv => [...], stdin => $octets, timeout => $seconds, max_output => $bytes, cancel_fh => $handle)returns aLibTmux::CommandResult. Stdout/stderr are separate octet strings. Nonzero exits are results; spawn, timeout, cancellation, output limits, and supervision failures throwLibTmux::Xexceptions.timeoutbounds one command's execution loop, excluding supervisor setup, async queue waiting, and separate cleanup time. - start method Return a
LibTmux::ProcessJobfor an executor adapter.