Core LibraryunreleasedAPI reference

Choose documentation 3

latest

Current version

latest
English

Unreleased LibTmux has not been released. Its API may change during development. This site's structure and URLs may change too.

MoreLess about this notice

function LibTmux.jl

run_command

Source and package
Qualified name
LibTmux.run_command
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, _checked, _version_guard, 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. The call checks the release of the selected daemon, or of the executable that would create it, against tmux 3.7c. The first command to an endpoint probes the release; later commands to the same executable and endpoint skip the probe. Every command runs behind a fence on the checked release, so a replaced daemon raises UnsupportedTmuxVersion before any effect. A fence mismatch, a vanished endpoint or a tmux 3.1 or older answer drops the remembered release and probes once more. The probe runs no user hook. It does not pin a 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. After a client exits by itself, a pipe that stays open and silent for 250 ms is closed and the output read so far is returned. 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 removed, unless server names no socket: then tmux finds the server through them, as it does for any client that is given neither -S nor -L. A command that names no target then acts on the pane TMUX_PANE names.

Recorded calls

source calls
No call edges in the Julia model.

The Julia reference records declarations, not calls, so this page shows no callers or callees. That is a limit of the extracted data, not a statement that nothing calls LibTmux.run_command.

Guides

task material

Pages that discuss run_command.

Esc
Search in

Type to search.

Reference previewOpen reference