Shorten all socket names because macOS is stupid.

This commit is contained in:
Nicholas Marriott
2026-07-06 11:50:58 +01:00
parent 069201dd1a
commit eb82e8527a
84 changed files with 114 additions and 113 deletions

View File

@@ -15,7 +15,8 @@ import tempfile
import time
tmux = sys.argv[1]
server = [tmux, "-Ltest", "-f/dev/null"]
label = "testA%d" % os.getpid()
server = [tmux, "-L" + label, "-f/dev/null"]
def run(*args, check=True):
return subprocess.run(server + list(args), check=check,
@@ -25,7 +26,7 @@ def attach():
pid, fd = os.forkpty()
if pid == 0:
os.environ["TERM"] = "xterm-256color"
os.execl(tmux, tmux, "-Ltest", "-f/dev/null", "attach-session",
os.execl(tmux, tmux, "-L" + label, "-f/dev/null", "attach-session",
"-t", "requests")
os.set_blocking(fd, False)
return pid, fd