Просмотр исходного кода

* apt-inst/contrib/extracttar.cc:
- ensure that in StartGzip the InFd is set to "AutoClose" to ensure
that the pipe is closed when InFd is closed. This fixes a Fd leak
(LP: #985452)

Michael Vogt лет назад: 14
Родитель
Сommit
2448a064f3
2 измененных файлов с 10 добавлено и 1 удалено
  1. 1 1
      apt-inst/contrib/extracttar.cc
  2. 9 0
      debian/changelog

+ 1 - 1
apt-inst/contrib/extracttar.cc

@@ -146,7 +146,7 @@ bool ExtractTar::StartGzip()
    }
 
    // Fix up our FDs
-   InFd.Fd(Pipes[0]);
+   InFd.OpenDescriptor(Pipes[0], FileFd::ReadOnly, FileFd::None, true);
    close(Pipes[1]);
    return true;
 }

+ 9 - 0
debian/changelog

@@ -1,3 +1,12 @@
+apt (0.8.16~exp15) unstable; urgency=low
+
+  * apt-inst/contrib/extracttar.cc:
+    - ensure that in StartGzip the InFd is set to "AutoClose" to ensure
+      that the pipe is closed when InFd is closed. This fixes a Fd leak
+      (LP: #985452)
+
+ -- Michael Vogt <michael.vogt@ubuntu.com>  Thu, 19 Apr 2012 10:53:30 +0200
+
 apt (0.8.16~exp14) UNRELEASED; urgency=low
 
   [ Michael Vogt ]