summaryrefslogtreecommitdiff
path: root/apt-pkg/contrib
diff options
context:
space:
mode:
authorDavid Kalnischkies <david@kalnischkies.de>2016-06-09 20:41:58 +0200
committerDavid Kalnischkies <david@kalnischkies.de>2016-06-10 10:48:25 +0200
commitbdc42211700ef0f6f40e4ef3f362e52d684d70fb (patch)
treeac3f4bbe8748cccb2561dee67dcb21700c0e6fe3 /apt-pkg/contrib
parent554bc997e4f619c72f883fd68cc896df96de58e5 (diff)
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).
Diffstat (limited to 'apt-pkg/contrib')
-rw-r--r--apt-pkg/contrib/fileutl.cc5
1 files changed, 5 insertions, 0 deletions
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;