summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLuke Shumaker <lukeshu@lukeshu.com>2018-10-01 00:44:10 -0400
committerLuke Shumaker <lukeshu@lukeshu.com>2018-10-01 20:18:00 -0400
commit96cccfa177b63cfc097bcc34cc74ce284c6a0656 (patch)
tree00454b6dff25df3d249917122466418cf845471c
parenteb628addb89229db73557af540f28b951b99f793 (diff)
libremakepkg: distcc-tool: Avoid using overly-long socket names
The maximum socket name length is surprising short. So `cd` and use a short relative path.
-rwxr-xr-xsrc/chroot-tools/distcc-tool5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/chroot-tools/distcc-tool b/src/chroot-tools/distcc-tool
index 4c6ef3f..4e2359f 100755
--- a/src/chroot-tools/distcc-tool
+++ b/src/chroot-tools/distcc-tool
@@ -218,9 +218,10 @@ odaemon() {
[[ $# -eq 1 ]] || panic
local chrootpath=$1
+ cd "$chrootpath"
umask 111
- socat UNIX-LISTEN:"$chrootpath/socket",fork SYSTEM:"${0@Q} server" &
- trap "jobs -p | xargs -r kill --; rm -f -- ${chrootpath@Q}/socket" EXIT
+ socat UNIX-LISTEN:"./socket",fork SYSTEM:"${0@Q} server" &
+ trap "jobs -p | xargs -r kill --; rm -f -- ./socket" EXIT
wait
}