about summary refs log tree commit diff
path: root/src/libstore/build.cc
diff options
context:
space:
mode:
authorEelco Dolstra <eelco.dolstra@logicblox.com>2012-04-14T22·20+0200
committerEelco Dolstra <eelco.dolstra@logicblox.com>2012-04-14T22·20+0200
commit31e34fcf932e86c398a38b39facc268026736f0c (patch)
tree52679cc849b57daf2aa64f8706f634961a8cc2d7 /src/libstore/build.cc
parent0b5107c016080e70d30ccba3afa0f9aa7a90a891 (diff)
Close almost all file descriptors in the builder
This regression was accidentally introduced in
35355fc1fcffbe859395e360c0a6a1463f137d63.
Diffstat (limited to 'src/libstore/build.cc')
-rw-r--r--src/libstore/build.cc3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/libstore/build.cc b/src/libstore/build.cc
index c13ea6d23d..77e968ddd0 100644
--- a/src/libstore/build.cc
+++ b/src/libstore/build.cc
@@ -1793,6 +1793,9 @@ void DerivationGoal::startBuilder()
             if (chdir(tmpDir.c_str()) == -1)
                 throw SysError(format("changing into `%1%'") % tmpDir);
 
+            /* Close all other file descriptors. */
+            closeMostFDs(set<int>());
+
 #ifdef CAN_DO_LINUX32_BUILDS
             /* Change the personality to 32-bit if we're doing an
                i686-linux build on an x86_64-linux machine. */