Core LibraryAPI Reference

Choose documentation 3

latest

Current version

latest
English

Prerelease This site documents an alpha of libtmux. Its structure, URLs and APIs are subject to change.

function LibTmux.jl latest

run_command

Module LibTmux.run_command LibTmux
Source and package
Module
LibTmux
Package
LibTmux
Source
src/process.jl

Methods#

run_command( connection::LibTmux.ControlConnection, argv::AbstractString...; timeout, cancel, check )[source]#

Run an admitted command on the existing control connection. The initial allowlist covers exact-ID destruction and restricted-name buffer deletion; raw output producers, formats and borrowed wait channels are rejected. Cancellation before write admission sends nothing. After admission it reports uncertain effects; its ledger slot remains until the completion fence retires. No command is replayed and no other transport is selected.

run_command(connection::ControlConnection, argv...; timeout=5.0, cancel=nothing, check=true)

run_command(server::LibTmux.Server, args::AbstractString...; check, env, kwargs...)[source]#

Run one tmux client with literal arguments and return owned output bytes. The client uses UTF-8 mode independently of the caller's locale. Nonzero exits raise CommandError unless check=false. I/O yields to other Julia tasks. Cancellation kills and reaps the client, not any remote pane job. This subprocess path checks no server generation; use strict references only through transports that explicitly advertise that capability.

run_command(server, args...; check=true, env=ENV, input=UInt8[], cancel=nothing,
timeout=nothing, max_output_bytes=8388608, max_error_bytes=1048576)

The first cancellation, deadline, output overflow or pipe error wins. Its result retains bounded output and observed exit/signal evidence after client retirement; it is nothing before submission. Failed input delivery is an I/O error even with check=false. Cleanup allows at most 900 ms for inherited output pipes after stopping the owned client, then closes them. Return or failure joins I/O tasks, timer tasks and any running cancellation callback. If cleanup also fails, CompositeException preserves the primary error first.

Arguments and individual environment entries are limited to a conservative 14 KiB; the combined client environment is limited to 128 KiB. Oversized entries fail before submission instead of being silently omitted by tmux. Inherited TMUX and TMUX_PANE are always removed.

Esc

Type to search.

Reference preview Open reference