From be0b9dda31ab42bb2e077751fc75abbc945e407f Mon Sep 17 00:00:00 2001
From: Eelco Dolstra <eelco.dolstra@logicblox.com>
Date: Fri, 10 May 2013 02:32:13 +0200
Subject: [PATCH] build-remote.pl: Pass /dev/null as SSH's stdin

Otherwise it will set the parent's stdin to non-blocking mode, causing
the subsequent read of the set of inputs/outputs to fail randomly.
That's insane.
---
 scripts/build-remote.pl.in | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/scripts/build-remote.pl.in b/scripts/build-remote.pl.in
index 6be4c45eb..dcd863003 100755
--- a/scripts/build-remote.pl.in
+++ b/scripts/build-remote.pl.in
@@ -197,7 +197,7 @@ REQ: while (1) {
         $hostName = $machine->{hostName};
         last REQ if
             openSSHConnection($hostName) &&
-            system("ssh $hostName @sshOpts nix-builds-inhibited >/dev/null 2>&1") != 0;
+            system("ssh $hostName @sshOpts nix-builds-inhibited < /dev/null > /dev/null 2>&1") != 0;
 
         warn "unable to open SSH connection to $hostName, trying other available machines...\n";
         $machine->{enabled} = 0;
-- 
GitLab