summaryrefslogtreecommitdiff
path: root/apt-pkg/contrib/fileutl.cc
diff options
context:
space:
mode:
authorMichael Vogt <mvo@ubuntu.com>2015-05-22 17:01:03 +0200
committerMichael Vogt <mvo@ubuntu.com>2015-05-22 17:01:03 +0200
commit4fc6b7570c3e97b65c118b58cdf6729fa94c9b03 (patch)
treef952bb728b9c23f1eebc8f1a87f527ed7c9b0b36 /apt-pkg/contrib/fileutl.cc
parent6bf93605fdb8e858d3f0a79a124c1d39f760094d (diff)
parent65759e00eff0513c34f584b99420b72fe0e5073e (diff)
Merge branch 'debian/sid' into debian/experimental
Conflicts: apt-pkg/pkgcache.h debian/changelog methods/https.cc methods/server.cc test/integration/test-apt-download-progress
Diffstat (limited to 'apt-pkg/contrib/fileutl.cc')
-rw-r--r--apt-pkg/contrib/fileutl.cc3
1 files changed, 2 insertions, 1 deletions
diff --git a/apt-pkg/contrib/fileutl.cc b/apt-pkg/contrib/fileutl.cc
index afc243b7f..8ec868ec0 100644
--- a/apt-pkg/contrib/fileutl.cc
+++ b/apt-pkg/contrib/fileutl.cc
@@ -800,8 +800,9 @@ pid_t ExecFork(std::set<int> KeepFDs)
signal(SIGCONT,SIG_DFL);
signal(SIGTSTP,SIG_DFL);
+ long ScOpenMax = sysconf(_SC_OPEN_MAX);
// Close all of our FDs - just in case
- for (int K = 3; K != sysconf(_SC_OPEN_MAX); K++)
+ for (int K = 3; K != ScOpenMax; K++)
{
if(KeepFDs.find(K) == KeepFDs.end())
fcntl(K,F_SETFD,FD_CLOEXEC);