From bdc42211700ef0f6f40e4ef3f362e52d684d70fb Mon Sep 17 00:00:00 2001 From: David Kalnischkies Date: Thu, 9 Jun 2016 20:41:58 +0200 Subject: do not hang on piped input in PipedFileFdPrivate This effects only compressors configured on the fly (rather then the inbuilt ones as they use a library). --- apt-pkg/contrib/fileutl.cc | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'apt-pkg/contrib/fileutl.cc') diff --git a/apt-pkg/contrib/fileutl.cc b/apt-pkg/contrib/fileutl.cc index 9990b753a..6bfa5ca92 100644 --- a/apt-pkg/contrib/fileutl.cc +++ b/apt-pkg/contrib/fileutl.cc @@ -1978,6 +1978,11 @@ public: virtual bool InternalClose(std::string const &) APT_OVERRIDE { bool Ret = true; + if (filefd->iFd != -1) + { + close(filefd->iFd); + filefd->iFd = -1; + } if (compressor_pid > 0) Ret &= ExecWait(compressor_pid, "FileFdCompressor", true); compressor_pid = -1; -- cgit v1.2.3-70-g09d2