aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-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 687ad7e47..dce57f751 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();