about summary refs log tree commit diff
path: root/src/nix.cc
diff options
context:
space:
mode:
Diffstat (limited to 'src/nix.cc')
-rw-r--r--src/nix.cc3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/nix.cc b/src/nix.cc
index 8380abc20e37..de16ed9822d5 100644
--- a/src/nix.cc
+++ b/src/nix.cc
@@ -133,7 +133,8 @@ struct StdoutSink : DumpSink
         (const unsigned char * data, unsigned int len)
     {
         /* Don't use cout, it's slow as hell! */
-        write(STDOUT_FILENO, (char *) data, len);
+        if (write(STDOUT_FILENO, (char *) data, len) != len)
+            throw SysError("writing to stdout");
     }
 };