diff options
author | David Kalnischkies <kalnischkies@gmail.com> | 2012-01-19 12:40:38 +0100 |
---|---|---|
committer | David Kalnischkies <kalnischkies@gmail.com> | 2012-01-19 12:40:38 +0100 |
commit | 67b5d3dc34e88e092c8e5f05efc82370a873c80f (patch) | |
tree | 2a6611273a030a0ceabf5fd8917edee8c8a2635f /apt-pkg/deb/dpkgpm.cc | |
parent | 0d5603b886f67562c105b03820c595ac7ae3451a (diff) |
* apt-pkg/deb/dpkgpm.cc:
- redirect out/input of dpkg --assert-multi-arch to /dev/null
Diffstat (limited to 'apt-pkg/deb/dpkgpm.cc')
-rw-r--r-- | apt-pkg/deb/dpkgpm.cc | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/apt-pkg/deb/dpkgpm.cc b/apt-pkg/deb/dpkgpm.cc index 4dc0baa50..0dc00e8ad 100644 --- a/apt-pkg/deb/dpkgpm.cc +++ b/apt-pkg/deb/dpkgpm.cc @@ -858,6 +858,11 @@ bool pkgDPkgPM::Go(int OutStatusFd) pid_t dpkgAssertMultiArch = ExecFork(); if (dpkgAssertMultiArch == 0) { + // redirect everything to the ultimate sink as we only need the exit-status + int const nullfd = open("/dev/null", O_RDONLY); + dup2(nullfd, STDIN_FILENO); + dup2(nullfd, STDOUT_FILENO); + dup2(nullfd, STDERR_FILENO); execv(Args[0], (char**) &Args[0]); _error->WarningE("dpkgGo", "Can't detect if dpkg supports multi-arch!"); _exit(2); |