diff options
author | fergus.henderson <fergus.henderson@01de4be4-8c4a-0410-9132-4925637da917> | 2009-01-26 23:50:57 +0000 |
---|---|---|
committer | fergus.henderson <fergus.henderson@01de4be4-8c4a-0410-9132-4925637da917> | 2009-01-26 23:50:57 +0000 |
commit | 6d2c05886957f0ae397996fb9cb07c7b57197bc9 (patch) | |
tree | 3f3576c0c56d51a0d869dda4a9757a1ef6a27af9 | |
parent | 179d06c956d2814dca6f97289d045aa6a254224a (diff) | |
download | distcc-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-x | pump.in | 6 |
1 files changed, 3 insertions, 3 deletions
@@ -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. |