mirror of
https://github.com/tmux/tmux.git
synced 2026-10-12 05:34:24 +00:00
Shorten all socket names because macOS is stupid.
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user