summaryrefslogtreecommitdiff
path: root/src/chroot-tools/distcc-tool
diff options
context:
space:
mode:
Diffstat (limited to 'src/chroot-tools/distcc-tool')
-rwxr-xr-xsrc/chroot-tools/distcc-tool6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/chroot-tools/distcc-tool b/src/chroot-tools/distcc-tool
index 00156ac..3f7a30f 100755
--- a/src/chroot-tools/distcc-tool
+++ b/src/chroot-tools/distcc-tool
@@ -211,8 +211,10 @@ odaemon() {
[[ $# -eq 1 ]] || panic
local chrootpath=$1
- trap "rm -f '$chrootpath/socket'" EXIT
- socat UNIX-LISTEN:"$chrootpath/socket",fork SYSTEM:"$0 server"
+ umask 111
+ socat UNIX-LISTEN:"$chrootpath/socket",fork SYSTEM:"$0 server" &
+ trap "kill -- $!; rm -f '$chrootpath/socket'" EXIT
+ wait
}
# Usage: idaemon DISTCC_HOSTS