summaryrefslogtreecommitdiff
path: root/src/chroot-tools
diff options
context:
space:
mode:
authorLuke Shumaker <lukeshu@lukeshu.com>2017-05-04 03:09:37 -0400
committerLuke Shumaker <lukeshu@lukeshu.com>2017-05-04 03:28:40 -0400
commit23e22a652e8cd3e09b7e74231a957ab921a6732b (patch)
tree93d10694e4bfa7d21f5fe40697f2b4c376f76255 /src/chroot-tools
parentba18e47d13ed606066ed75a3d2b624b242c9c3c5 (diff)
distcc-tool: use SO_REUSEADDR for listening on TCP sockets
Diffstat (limited to 'src/chroot-tools')
-rwxr-xr-xsrc/chroot-tools/distcc-tool6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/chroot-tools/distcc-tool b/src/chroot-tools/distcc-tool
index ba0c9bc..5e71d51 100755
--- a/src/chroot-tools/distcc-tool
+++ b/src/chroot-tools/distcc-tool
@@ -2,7 +2,7 @@
# -*- tab-width: 4; sh-basic-offset: 4 -*-
# distcc-tool
-# Copyright (C) 2013-2014 Luke Shumaker <lukeshu@sbcglobal.net>
+# Copyright (C) 2013-2014, 2017 Luke Shumaker <lukeshu@sbcglobal.net>
#
# License: GNU GPLv3+
#
@@ -162,7 +162,7 @@ parse_DISTCC_HOSTS() {
# set up port forwaring
if $forward_ports; then
- socat TCP-LISTEN:${newport},fork SYSTEM:"$q0 client $HOSTID ${PORT:-3632}" &
+ socat TCP-LISTEN:${newport},reuseaddr,fork SYSTEM:"$q0 client $HOSTID ${PORT:-3632}" &
pids+=($!)
fi
@@ -179,7 +179,7 @@ parse_DISTCC_HOSTS() {
if [[ -z "${pids[*]}" ]]; then
# listen on port 8000, but immediatly close, just so that we are
# listening on something
- socat TCP-LISTEN:${newport},fork SYSTEM:true &
+ socat TCP-LISTEN:${newport},reuseaddr,fork SYSTEM:true &
pids+=($!)
fi
trap "kill -- ${pids[*]}" EXIT