libtmux Reference MCP Search
On this page

namedSocketRoot

View as Markdown

Package
libtmux-swift
Source
Tests/TmuxFixture/TmuxFixture.swift
namedSocketRoot : let namedSocketRoot: URL?
constant [source]
constant [source]
namedSocketRoot

The directory a socket *name* resolves inside, when the run provides one.

tmux looks a name up in TMUX_TMPDIR, whose default is shared with every other tmux on the machine — the other libtmux ports' included. A suite that addressed servers by name without moving that directory would put its sockets exactly where anything sweeping by prefix can reach them, which is what this whole root exists to prevent.

So the directory is taken from the environment rather than set into it. The obvious alternative — setenv from the fixture — writes to environ while other cases are concurrently reading it to build a tmux environment, and that is a data race whether or not it has bitten yet. Cases that address a socket by path do not care either way, -S being absolute.

CONTRIBUTING.md and CI name the directory; namedSocketsAvailable is what the suite checks so a run without one skips those cases rather than scattering sockets.

0 declared, 0 inherited

Esc

Type to search.