about summary refs log tree commit diff
path: root/src/libstore/build.cc
diff options
context:
space:
mode:
authorEelco Dolstra <eelco.dolstra@logicblox.com>2014-12-12T13·35+0100
committerEelco Dolstra <eelco.dolstra@logicblox.com>2014-12-12T13·35+0100
commit28f22b4653bfcf1be41b042c8068b6513dd3e931 (patch)
tree9eadec69bd2e6b35c204976e752bccd48bb07df8 /src/libstore/build.cc
parent5a2d45164899479cb3dfe94cb7659fd522163acc (diff)
Ensure we're writing to stderr in the builder
http://hydra.nixos.org/build/17862041
Diffstat (limited to 'src/libstore/build.cc')
-rw-r--r--src/libstore/build.cc6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/libstore/build.cc b/src/libstore/build.cc
index d759d15bdd68..1ae24275c91a 100644
--- a/src/libstore/build.cc
+++ b/src/libstore/build.cc
@@ -2166,7 +2166,7 @@ void DerivationGoal::runChild()
         restoreSIGPIPE();
 
         /* Indicate that we managed to set up the build environment. */
-        writeToStderr("\n");
+        writeFull(STDERR_FILENO, "\n");
 
         /* Execute the program.  This should not return. */
         execve(program.c_str(), (char * *) &args[0], (char * *) envArr);
@@ -2174,7 +2174,7 @@ void DerivationGoal::runChild()
         throw SysError(format("executing ‘%1%’") % drv.builder);
 
     } catch (std::exception & e) {
-        writeToStderr("while setting up the build environment: " + string(e.what()) + "\n");
+        writeFull(STDERR_FILENO, "while setting up the build environment: " + string(e.what()) + "\n");
         _exit(1);
     }
 }
@@ -2487,7 +2487,7 @@ void DerivationGoal::handleChildOutput(int fd, const string & data)
             BZ2_bzWrite(&err, bzLogFile, (unsigned char *) data.data(), data.size());
             if (err != BZ_OK) throw Error(format("cannot write to compressed log file (BZip2 error = %1%)") % err);
         } else if (fdLogFile != -1)
-            writeFull(fdLogFile, (unsigned char *) data.data(), data.size());
+            writeFull(fdLogFile, data);
     }
 
     if (hook && fd == hook->fromHook.readSide)