summaryrefslogtreecommitdiff
path: root/apt-pkg/contrib
diff options
context:
space:
mode:
authorMichael Vogt <mvo@debian.org>2013-11-01 10:42:49 +0100
committerMichael Vogt <mvo@debian.org>2013-11-01 10:42:49 +0100
commit61f954bff040809e7ab57b3adec2fe95339ffb94 (patch)
treee9a2dd360db4e42e00d2658d6535d7b44ecf3ab1 /apt-pkg/contrib
parent213a00a43774ad41d1a59c82fe042390026ab048 (diff)
small documentation updates0.9.13_exp1
Diffstat (limited to 'apt-pkg/contrib')
-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 2347ef140..d2be276c7 100644
--- a/apt-pkg/contrib/fileutl.cc
+++ b/apt-pkg/contrib/fileutl.cc
@@ -769,6 +769,7 @@ pid_t ExecFork()
{
set<int> KeepFDs;
+ // FIXME: remove looking at APT::Keep-Fds eventually, its a hack
Configuration::Item const *Opts = _config->Tree("APT::Keep-Fds");
if (Opts != 0 && Opts->Child != 0)
{
@@ -806,7 +807,7 @@ pid_t ExecFork(std::set<int> KeepFDs)
signal(SIGTSTP,SIG_DFL);
// Close all of our FDs - just in case
- for (int K = 3; K != 40; K++)
+ for (int K = 3; K != sysconf(_SC_OPEN_MAX); K++)
{
if(KeepFDs.find(K) == KeepFDs.end())
fcntl(K,F_SETFD,FD_CLOEXEC);