termux-packages/packages/tmux/socket-path.patch

34 lines
1.1 KiB
Diff

diff -u -r ../tmux-3.1c/tmux.1 ./tmux.1
--- ../tmux-3.1c/tmux.1 2020-05-04 10:06:57.000000000 +0200
+++ ./tmux.1 2020-08-06 10:59:21.812427968 +0200
@@ -90,7 +90,7 @@
.Em server .
The server and each client are separate processes which communicate through a
socket in
-.Pa /tmp .
+.Pa @TERMUX_PREFIX@/var/run .
.Pp
The options are as follows:
.Bl -tag -width "XXXXXXXXXXXX"
@@ -145,7 +145,7 @@
stores the server socket in a directory under
.Ev TMUX_TMPDIR
or
-.Pa /tmp
+.Pa @TERMUX_PREFIX@/var/run
if it is unset.
The default socket is named
.Em default .
diff -u -r ../tmux-3.1c/tmux.c ./tmux.c
--- ../tmux-3.1c/tmux.c 2020-05-04 10:06:57.000000000 +0200
+++ ./tmux.c 2020-08-06 10:57:51.152231951 +0200
@@ -121,7 +121,7 @@
if ((s = getenv("TMUX_TMPDIR")) != NULL && *s != '\0')
xasprintf(&base, "%s/tmux-%ld", s, (long)uid);
else
- xasprintf(&base, "%s/tmux-%ld", _PATH_TMP, (long)uid);
+ xasprintf(&base, "%s/tmux-%ld", "@TERMUX_PREFIX@/var/run", (long)uid);
if (realpath(base, resolved) == NULL &&
strlcpy(resolved, base, sizeof resolved) >= sizeof resolved) {
errno = ERANGE;