diff options
author | Luke Shumaker <lukeshu@lukeshu.com> | 2018-10-01 00:44:10 -0400 |
---|---|---|
committer | Luke Shumaker <lukeshu@lukeshu.com> | 2018-10-01 20:18:00 -0400 |
commit | 96cccfa177b63cfc097bcc34cc74ce284c6a0656 (patch) | |
tree | 00454b6dff25df3d249917122466418cf845471c | |
parent | eb628addb89229db73557af540f28b951b99f793 (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-x | src/chroot-tools/distcc-tool | 5 |
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 } |