Core Library0.xAPI reference

Choose documentation 1

pr-173

Current version

pr-173
English

Early release libtmux is released, and its APIs may still change between releases. This site's structure and URLs may change too.

MoreLess about this notice

function libtmux-elixir

Control.start_link/1

Starts a linked connection and returns {:ok, root, control}.

Source and package
Qualified name
LibTmux.Control.start_link/1
Module
LibTmux
Declared in
Control
Package
libtmux
Source
lib/libtmux/control.ex
start_link(options) @spec start_link([start_option()]) :: {:ok, pid(), t()} | {:error, LibTmux.Error.t()}

Description

Require server: %LibTmux.Server{}, session: {:existing, "$id"} and lane: :host_qualified. No session is created. The attachment is visible in tmux's client counts and can update session state. no-output,ignore-size suppresses pane output and excludes this client from window sizing.

timeout defaults to 5000ms and accepts 1..600000ms. One budget covers input preparation, Root startup, bootstrap, ready waiting and handoff. A fresh factory returns a ready handle. Runtime failures return a structured error; invalid trusted options raise ArgumentError. Ordinary OTP links remain: an asynchronous fatal Root exit can terminate a non-trapping caller.

Failed startup fences its lifetime and requests exact-Root cleanup. Error details distinguish observed Root exit from a kill request; unknown native cleanup is never success. OTP can await Root exit after its initialization timer expires, so a strict wall-clock caller-return bound remains unqualified.

Optional capacity, metadata_capacity and waiter_capacity default to 32 and accept 1..256. retention_ms defaults to 60000 and accepts 1..600000.

Ready connections buffer at most 64 KiB or 128 stdout chunks behind the reader. Overflow closes the whole epoch with resource_limit; it never replays commands. These receive limits do not cap borrowed-server memory.

See the worked example.

Parameters

Recorded calls

source calls
No call edges in the Elixir model.

The Elixir 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.Control.start_link/1.

tmux command

task material

The tmux commands behind start_link/1.

tmux C API

task material

The C declarations in tmux that implement these commands.

Guides

task material

Pages that discuss start_link/1.

Esc
Search in

Type to search.

Reference previewOpen reference