From 0b4895d3d223c97c6ba1ece9f7b88479debb7fb7 Mon Sep 17 00:00:00 2001 From: David Kalnischkies Date: Thu, 19 Apr 2012 11:05:41 +0200 Subject: * apt-pkg/contrib/fileutl.cc: - redirect stderr from compressors to /dev/null --- apt-pkg/contrib/fileutl.cc | 6 ++++++ debian/changelog | 4 +++- 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/apt-pkg/contrib/fileutl.cc b/apt-pkg/contrib/fileutl.cc index 9e3611b26..e9d1ba1ce 100644 --- a/apt-pkg/contrib/fileutl.cc +++ b/apt-pkg/contrib/fileutl.cc @@ -1098,6 +1098,12 @@ bool FileFd::OpenInternDescriptor(unsigned int const Mode, APT::Configuration::C dup2(d->compressed_fd,STDIN_FILENO); dup2(Pipe[1],STDOUT_FILENO); } + int const nullfd = open("/dev/null", O_WRONLY); + if (nullfd != -1) + { + dup2(nullfd,STDERR_FILENO); + close(nullfd); + } SetCloseExec(STDOUT_FILENO,false); SetCloseExec(STDIN_FILENO,false); diff --git a/debian/changelog b/debian/changelog index 58da9d8de..93dde4b91 100644 --- a/debian/changelog +++ b/debian/changelog @@ -3,8 +3,10 @@ apt (0.9.1+nmu1) unstable; urgency=low [ David Kalnischkies ] * apt-pkg/deb/deblistparser.cc: - only treat the native apt as essential by default + * apt-pkg/contrib/fileutl.cc: + - redirect stderr from compressors to /dev/null - -- David Kalnischkies Wed, 18 Apr 2012 18:12:07 +0200 + -- David Kalnischkies Thu, 19 Apr 2012 11:04:37 +0200 apt (0.9.1) unstable; urgency=low -- cgit v1.2.3