diff options
author | Eelco Dolstra <edolstra@gmail.com> | 2017-08-09T14·22+0200 |
---|---|---|
committer | Eelco Dolstra <edolstra@gmail.com> | 2017-08-09T14·22+0200 |
commit | af765a8eab288eb638100e027b97a1d15e4e3026 (patch) | |
tree | 0ab17da6aae1af4c83efef428deae6d0b534aa93 /src/libstore | |
parent | c6184dec6c208d39a329586d0503b7a51bc2ded1 (diff) |
Use /proc/self/fd to efficiently close all FDs on Linux
Issue #1506.
Diffstat (limited to 'src/libstore')
-rw-r--r-- | src/libstore/build.cc | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/libstore/build.cc b/src/libstore/build.cc index db5f606fa883..9250a9b1778f 100644 --- a/src/libstore/build.cc +++ b/src/libstore/build.cc @@ -2556,7 +2556,7 @@ void DerivationGoal::runChild() throw SysError(format("changing into '%1%'") % tmpDir); /* Close all other file descriptors. */ - closeMostFDs(set<int>()); + closeMostFDs({STDIN_FILENO, STDOUT_FILENO, STDERR_FILENO}); #if __linux__ /* Change the personality to 32-bit if we're doing an |