aboutsummaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
authorEelco Dolstra <eelco.dolstra@logicblox.com>2012-09-12 12:15:47 -0400
committerEelco Dolstra <eelco.dolstra@logicblox.com>2012-09-12 12:18:14 -0400
commit479e9172b3583cedcada90ed193cab156cdc56b5 (patch)
treedebd2d7d31ebbfee5e8c6462ada05f53f0424600 /scripts
parent4ba47205c687772cf73a490eac3a489931d4913b (diff)
Build hook: Pass the timeout to the remote builder
Note that this will only work if the client has a very recent Nix version (post 15e1b2c223494ecb5efefc3ea0e3b926a6b1d7dc), otherwise the --option flag will just be ignored. Fixes #50.
Diffstat (limited to 'scripts')
-rwxr-xr-xscripts/build-remote.pl.in7
1 files changed, 4 insertions, 3 deletions
diff --git a/scripts/build-remote.pl.in b/scripts/build-remote.pl.in
index 631aba680..458d31be9 100755
--- a/scripts/build-remote.pl.in
+++ b/scripts/build-remote.pl.in
@@ -46,8 +46,7 @@ sub all { $_ || return 0 for @_; 1 }
# Initialisation.
my $loadIncreased = 0;
-my ($localSystem, $maxSilentTime, $printBuildTrace) = @ARGV;
-$maxSilentTime = 0 unless defined $maxSilentTime;
+my ($localSystem, $maxSilentTime, $printBuildTrace, $buildTimeout) = @ARGV;
my $currentLoad = $ENV{"NIX_CURRENT_LOAD"};
my $conf = $ENV{"NIX_REMOTE_SYSTEMS"};
@@ -258,7 +257,9 @@ close UPLOADLOCK;
# Perform the build.
-my $buildFlags = "--max-silent-time $maxSilentTime --fallback --add-root $rootsDir/\$PPID.out --option verbosity 0";
+my $buildFlags =
+ "--max-silent-time $maxSilentTime --option build-timeout $buildTimeout "
+ . "--fallback --add-root $rootsDir/\$PPID.out --option verbosity 0";
# We let the remote side kill its process group when the connection is
# closed unexpectedly. This is necessary to ensure that no processes