aboutsummaryrefslogtreecommitdiff
path: root/src/libstore/build/local-derivation-goal.cc
diff options
context:
space:
mode:
authoreldritch horrors <pennae@lix.systems>2024-08-09 21:17:52 +0200
committereldritch horrors <pennae@lix.systems>2024-08-09 19:59:17 +0000
commitc7d97802e4f59b8621e67cf62275d6a7fde8fe62 (patch)
tree8798b34ab28dd2b704da20a21659de2ad24fda07 /src/libstore/build/local-derivation-goal.cc
parent35a2f28a46613ad185b96d6e38c3f5d13bfc79b5 (diff)
libutil: rename and optimize closeMostFDs
this is only used to close non-stdio files in derivation sandboxes. we may as well encode that in its name, drop the unnecessary integer set, and use close_range to deal with the actual closing of files. not only is this clearer, it also makes sandbox setup on linux fast by 1ms each Change-Id: Id90e259a49c7bc896189e76bfbbf6ef2c0bcd3b2
Diffstat (limited to 'src/libstore/build/local-derivation-goal.cc')
-rw-r--r--src/libstore/build/local-derivation-goal.cc2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/libstore/build/local-derivation-goal.cc b/src/libstore/build/local-derivation-goal.cc
index 8b640e4ad..246cb68f6 100644
--- a/src/libstore/build/local-derivation-goal.cc
+++ b/src/libstore/build/local-derivation-goal.cc
@@ -1618,7 +1618,7 @@ void LocalDerivationGoal::runChild()
throw SysError("changing into '%1%'", tmpDir);
/* Close all other file descriptors. */
- closeMostFDs({STDIN_FILENO, STDOUT_FILENO, STDERR_FILENO});
+ closeExtraFDs();
setPersonality(drv->platform);