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.

constant libtmux-swift latest

namedSocketRoot

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

Source and package
Qualified name
namedSocketRoot
Package
libtmux-swift
Source
Tests/TmuxFixture/TmuxFixture.swift
namedSocketRoot : let namedSocketRoot: URL?

Description#

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.

Esc

Type to search.

Reference previewOpen reference