about summary refs log tree commit diff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/libstore/local-store.cc4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/libstore/local-store.cc b/src/libstore/local-store.cc
index 687ad7e47f19..dce57f751a99 100644
--- a/src/libstore/local-store.cc
+++ b/src/libstore/local-store.cc
@@ -1007,6 +1007,10 @@ void LocalStore::startSubstituter(const Path & substituter, RunningSubstituter &
     fromPipe.create();
     errorPipe.create();
 
+    /* Hack: prevent substituters that write too much to stderr from
+       deadlocking our read() from stdout. */
+    fcntl(errorPipe.writeSide, F_SETFL, O_NONBLOCK);
+
     setSubstituterEnv();
 
     run.pid = maybeVfork();