summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorfergus.henderson <fergus.henderson@01de4be4-8c4a-0410-9132-4925637da917>2009-01-26 23:50:57 +0000
committerfergus.henderson <fergus.henderson@01de4be4-8c4a-0410-9132-4925637da917>2009-01-26 23:50:57 +0000
commit6d2c05886957f0ae397996fb9cb07c7b57197bc9 (patch)
tree3f3576c0c56d51a0d869dda4a9757a1ef6a27af9
parent179d06c956d2814dca6f97289d045aa6a254224a (diff)
downloaddistcc-6d2c05886957f0ae397996fb9cb07c7b57197bc9.tar.gz
Handle failure of "mktemp" more gracefully in the pump script.
It was printing an error message, but then it would continue on even if mktemp had failed (it called "exit 1", but only in a subshell). It would then go on and try to start the include server, which would end up hanging. The fix is to make sure that we call "exit 1" from the main shell whenever MakeTmpFile fails. Reviewed by Craig Silverstein. git-svn-id: http://distcc.googlecode.com/svn/trunk@653 01de4be4-8c4a-0410-9132-4925637da917
-rwxr-xr-xpump.in6
1 files changed, 3 insertions, 3 deletions
diff --git a/pump.in b/pump.in
index 417cf6e..9597096 100755
--- a/pump.in
+++ b/pump.in
@@ -239,7 +239,7 @@ StartIncludeServer() {
fi
# Create a temporary directory $socket_dir.
- socket_dir=`MakeTmpFile "distcc-pump" -d`
+ socket_dir=`MakeTmpFile "distcc-pump" -d` || exit 1
# The socket file on which the include server accepts connections.
socket="$socket_dir/socket"
@@ -254,7 +254,7 @@ StartIncludeServer() {
include_server_stderr="$socket_dir/stderr"
# File for the include server process id.
- tmp_pid_file=`MakeTmpFile "distcc-pump-pid"`
+ tmp_pid_file=`MakeTmpFile "distcc-pump-pid"` || exit 1
# Start include server in optimized mode (no assertions) and with
# debug level 1 for tracing warnings.
@@ -423,7 +423,7 @@ StartIncludeServerAndDetermineHosts() {
# activities happen in parallel.
# First, the lsdistcc command goes in the background.
- available_hosts_file=`MakeTmpFile "distcc-pump-hosts"`
+ available_hosts_file=`MakeTmpFile "distcc-pump-hosts"` || exit 1
AvailableHosts "$available_hosts_file" &
# Second, the include server goes in the foreground so variables can be set.