Core Library0.xAPI Reference

Choose documentation 3

latest

Current version

latest
English

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

function libtmux-swift latest

withTmuxServer(socketFileName:_:)

Runs body against a private tmux server and always kills it — including when this process is killed outright.

Source and package
Qualified name
withTmuxServer(socketFileName:_:)
Package
libtmux-swift
Source
Tests/TmuxFixture/TmuxFixture.swift
withTmuxServer( socketFileName: String, body: (Server) async throws -> Result ) -> Result

Description#

Each case gets its own socket, so cases never see each other's sessions and teardown never touches a server it did not start. The server is bootstrapped with one session named bootstrap: a tmux server exits as soon as its last session goes away, so without one there is nothing to hold it open. Scope assertions to the objects the case created rather than to the server being otherwise empty.

Type parameters
Parameters
Raises

Guides#

Pages that discuss withTmuxServer(socketFileName:_:).

Esc

Type to search.

Reference previewOpen reference