tmux_program
Run an application in a PTY on a private tmux server.
Source and package
- Qualified name
-
tmux_program - Package
- libtmux_erlang
- Source
- apps/libtmux_erlang/src/tmux_program.erl
- tmux_program
-
Description
Pass an absolute path to tmux and a list of binary arguments starting with the application's absolute path. Releases from tmux 3.8 support the history counters used in the result. Check the minimum with
tmux_capability:describe/1and the featureprogram_history.run/3starts, awaits and releases the program. Usestart/3when you need to send input, wait from more than one process or request an early stop. The caller that starts the program owns its lifetime.See Run a program in a private terminal for an executable example, capture limits and cleanup recovery.
Members12 members
Common operations1
- start/3 function Admit a run and return its handle while native setup continues. The deadline covers setup, execution and capture. Cleanup is collected separately. Eight program slots are shared across each Erlang node.
Other members11
- await_started/2 function Wait for the launch gate to open. Use
await/2for the application result. - await/2 function Wait for the result and cleanup receipt. An
await_timeoutleaves the run active. - capture/0 type The verified application exit, rendered terminal bytes and cleanup receipt.
- history/0 type The tmux history size, limit, line counters and generation.
- options/0 type Resource limits and environment for an owned launch.
- release/1 function Discard a completed result. Native resources with unconfirmed retirement keep their slot.
- result/0 type A completed capture or a structured failure. A nonzero exit can have a complete capture.
- run/3 function Start a private terminal, await its result and release the result handle.
- send_text/2 function Send up to 2,000 literal input bytes to the live program. The program's terminal settings govern how it reads the bytes. A second input request returns
program_input_busywhile the first occupies the input slot. - stop/1 function Request stop. Use
await/2to collect the outcome and confirm retirement. - t/0 type A handle for one owned program and its retained result.