about summary refs log tree commit diff
path: root/src/libstore/ssh.cc
diff options
context:
space:
mode:
authorEelco Dolstra <edolstra@gmail.com>2017-05-02T10·01+0200
committerEelco Dolstra <edolstra@gmail.com>2017-05-02T10·02+0200
commitfeefcb3a982d3e3b8e89798d72d8afa996169569 (patch)
tree6069b08a1d0d3be30761e55bd1651c10113fe67f /src/libstore/ssh.cc
parent3a5f04f48cc39eec5cc454e387aa290e08295aff (diff)
build-remote: Ugly hackery to get build logs to work
The build hook mechanism expects build log output to go to file
descriptor 4, so do that.
Diffstat (limited to 'src/libstore/ssh.cc')
-rw-r--r--src/libstore/ssh.cc2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/libstore/ssh.cc b/src/libstore/ssh.cc
index e54f3f4ba284..6edabaa3a1d9 100644
--- a/src/libstore/ssh.cc
+++ b/src/libstore/ssh.cc
@@ -31,6 +31,8 @@ std::unique_ptr<SSHMaster::Connection> SSHMaster::startCommand(const std::string
             throw SysError("duping over stdin");
         if (dup2(out.writeSide.get(), STDOUT_FILENO) == -1)
             throw SysError("duping over stdout");
+        if (logFD != -1 && dup2(logFD, STDERR_FILENO) == -1)
+            throw SysError("duping over stderr");
 
         Strings args = { "ssh", host.c_str(), "-x", "-a" };
         addCommonSSHOpts(args);