about summary refs log tree commit diff
path: root/src/libstore/build.cc
diff options
context:
space:
mode:
authorEelco Dolstra <edolstra@gmail.com>2018-11-15T11·59+0100
committerEelco Dolstra <edolstra@gmail.com>2018-11-15T12·20+0100
commita32ff2573ba4d0df4e3360c5a96398738da953f6 (patch)
tree831ef2cb312018a77abc42a9e701eae93914f526 /src/libstore/build.cc
parent32a0a223d589085ad43d77f4f36266a74e2822a8 (diff)
Fix 'Read-only file system' when building a derivation
Diffstat (limited to 'src/libstore/build.cc')
-rw-r--r--src/libstore/build.cc2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/libstore/build.cc b/src/libstore/build.cc
index 676ad5856b13..9c408e29c06c 100644
--- a/src/libstore/build.cc
+++ b/src/libstore/build.cc
@@ -2193,6 +2193,7 @@ void DerivationGoal::startBuilder()
         userNamespaceSync.create();
 
         options.allowVfork = false;
+        options.restoreMountNamespace = false;
 
         Pid helper = startProcess([&]() {
 
@@ -2259,6 +2260,7 @@ void DerivationGoal::startBuilder()
 #endif
     {
         options.allowVfork = !buildUser && !drv->isBuiltin();
+        options.restoreMountNamespace = false;
         pid = startProcess([&]() {
             runChild();
         }, options);