Branch: refs/heads/master
  Home:   https://github.com/NixOS/nix
  Commit: 31e34fcf932e86c398a38b39facc268026736f0c
      
https://github.com/NixOS/nix/commit/31e34fcf932e86c398a38b39facc268026736f0c
  Author: Eelco Dolstra <[email protected]>
  Date:   2012-04-14 (Sat, 14 Apr 2012)

  Changed paths:
    M src/libstore/build.cc

  Log Message:
  -----------
  Close almost all file descriptors in the builder

This regression was accidentally introduced in
35355fc1fcffbe859395e360c0a6a1463f137d63.


diff --git a/src/libstore/build.cc b/src/libstore/build.cc
index c13ea6d..77e968d 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. */


================================================================

_______________________________________________
nix-commits mailing list
[email protected]
http://lists.science.uu.nl/mailman/listinfo/nix-commits

Reply via email to