Core LibraryunreleasedAPI Reference

Choose documentation 2

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.

function libtmux-ocaml latest

Terminal.attach_current

Run an interactive terminal client until it exits. Select the exact session ID on the daemon currently listening at endpoint; this is explicitly unbound and accepts no captured target. No retry or daemon startup occurs. A successful result proves client exit, not continued attachment. Diagnostics go to stderr.

Source and package
Qualified name
Libtmux_unix.Terminal.attach_current
Module
Libtmux_unix
Declared in
Terminal
Package
libtmux-unix
Source
unix/libtmux_unix.mli
val attach_current : ?cancel:Cancellation.t -> ?cleanup:Cleanup.t -> ?binary:string -> ?read_only:bool -> ?update_environment:bool -> ?stdin:Unix.file_descr -> ?stdout:Unix.file_descr -> ?stderr:Unix.file_descr -> Libtmux.Endpoint.t -> session:Libtmux.Session.Id.t -> (unit, Libtmux.Error.t) result

Public owner: Libtmux_unix

Description#

Descriptors default to the application's standard streams and remain caller-owned. stdin must be a terminal. Environment updates and read-only mode are disabled by default; inherited TMUX and TMUX_PANE are removed. Cancellation terminates and reaps this terminal client, leaves the daemon running, then raises Cancellation.Cancelled. TERM gets 200 ms of cooperative grace before KILL and reaping. Scheduling and uninterruptible kernel work can add time. Supply cleanup before the call to retain secondary failures after cancellation.

Parameters
Esc

Type to search.

Reference previewOpen reference