about summary refs log tree commit diff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/libstore/build.cc6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/libstore/build.cc b/src/libstore/build.cc
index b6293c15ebcb..09cc2709ab79 100644
--- a/src/libstore/build.cc
+++ b/src/libstore/build.cc
@@ -2345,7 +2345,11 @@ void DerivationGoal::runChild()
 
         commonChildInit(builderOut);
 
-        setupSeccomp();
+        try {
+            setupSeccomp();
+        } catch (...) {
+            if (buildUser) throw;
+        }
 
         bool setUser = true;