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 exit, using the application's process manager and standard streams unless explicit flows are supplied. stdin must be backed by a terminal descriptor; a pipe-backed flow is rejected by tmux. Select the exact ID on the daemon currently listening at endpoint, without a captured target, binding, retry or daemon startup.

Source and package
Qualified name
Libtmux_eio.Terminal.attach_current
Module
Libtmux_eio
Declared in
Terminal
Package
libtmux-eio
Source
eio/libtmux_eio.mli
val attach_current : ?cleanup:Cleanup.t -> ?binary:string -> ?read_only:bool -> ?update_environment:bool -> ?stdin:[> Eio.Flow.source_ty ] Eio.Flow.source -> ?stdout:[> Eio.Flow.sink_ty ] Eio.Flow.sink -> ?stderr:[> Eio.Flow.sink_ty ] Eio.Flow.sink -> process_mgr:[> [> `Generic ] Eio.Process.mgr_ty ] Eio.Process.mgr -> Libtmux.Endpoint.t -> session:Libtmux.Session.Id.t -> (unit, Libtmux.Error.t) result

Public owner: Libtmux_eio

Description#

Environment updates and read-only mode default to false. Clear inherited TMUX and TMUX_PANE. Cancellation propagates after terminating and reaping this client; it does not stop the daemon. Cooperative TERM gets 200 ms of grace before forced termination, while other fibers can run. Scheduling and kernel completion can add time. Success proves terminal client exit. Diagnostics go to stderr; borrowed flows stay open. Supply cleanup before the call to retain secondary failures after cancellation.

Parameters
Esc

Type to search.

Reference previewOpen reference