libtmux Reference MCP Search
On this page

withTmuxServer(socketFileName:_:)

View as Markdown

Package
libtmux-swift
Source
Tests/TmuxFixture/TmuxFixture.swift
withTmuxServer(socketFileName:_:) ( socketFileName : String , body : (Server) async throws -> Result ) Result
functionasync [source]
functionasync [source]
withTmuxServer(socketFileName:_:)

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

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.

Raises

0 declared, 0 inherited

Esc

Type to search.