1
0
Fork 0
mirror of https://github.com/NixOS/nix synced 2025-07-06 21:41:48 +02:00

Propagate remote timeouts properly

This commit is contained in:
Eelco Dolstra 2014-08-17 19:09:03 +02:00
parent c6e85ee474
commit 42e9ad8fd1
2 changed files with 38 additions and 31 deletions

View file

@ -258,13 +258,8 @@ writeInt($maxSilentTime, $to);
writeInt($buildTimeout, $to);
my $res = readInt($from);
if ($res != 0) {
# Note that if we get exit code 100 from `nix-store -r', it
# denotes a permanent build failure (as opposed to an SSH problem
# or a temporary Nix problem). We propagate this to the caller to
# allow it to distinguish between transient and permanent
# failures.
my $msg = readString($from);
print STDERR "error: $msg (on `$hostName')\n";
print STDERR "error: $msg on `$hostName'\n";
exit $res;
}