On this page
namedSocketRoot
- Package
- libtmux-swift
- Source
- Tests/TmuxFixture/TmuxFixture.swift
- namedSocketRoot : let namedSocketRoot: URL?
-
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 —
setenvfrom the fixture — writes toenvironwhile 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,-Sbeing absolute.CONTRIBUTING.mdand CI name the directory;namedSocketsAvailableis what the suite checks so a run without one skips those cases rather than scattering sockets.
0 declared, 0 inherited