diff options
author | David Kalnischkies <david@kalnischkies.de> | 2016-06-09 22:58:06 +0200 |
---|---|---|
committer | David Kalnischkies <david@kalnischkies.de> | 2016-06-10 10:49:41 +0200 |
commit | 2202a8a05766586c60217d43193416dbd84be027 (patch) | |
tree | 1089154fe51f494f826dff03b604e97465d90711 /apt-pkg | |
parent | 6f35be91c9e86e463bca7df6eadf05412c7b732c (diff) |
don't leak EDSP solver output fd
Diffstat (limited to 'apt-pkg')
-rw-r--r-- | apt-pkg/edsp.cc | 2 | ||||
-rw-r--r-- | apt-pkg/edsp.h | 5 |
2 files changed, 4 insertions, 3 deletions
diff --git a/apt-pkg/edsp.cc b/apt-pkg/edsp.cc index 890252ba4..6e0a0fc2f 100644 --- a/apt-pkg/edsp.cc +++ b/apt-pkg/edsp.cc @@ -625,7 +625,7 @@ bool EDSP::ReadResponse(int const input, pkgDepCache &Cache, OpProgress *Progres } FileFd in; - in.OpenDescriptor(input, FileFd::ReadOnly); + in.OpenDescriptor(input, FileFd::ReadOnly, true); pkgTagFile response(&in, 100); pkgTagSection section; diff --git a/apt-pkg/edsp.h b/apt-pkg/edsp.h index 57d4214e8..f1624cd6a 100644 --- a/apt-pkg/edsp.h +++ b/apt-pkg/edsp.h @@ -109,8 +109,9 @@ namespace EDSP /*{{{*/ * * This method takes care of interpreting whatever the solver sends * through the standard output like a solution, progress or an error. - * The main thread should handle his control over to this method to - * wait for the solver to finish the given task + * The main thread should hand his control over to this method to + * wait for the solver to finish the given task. The file descriptor + * used as input is completely consumed and closed by the method. * * \param input file descriptor with the response from the solver * \param Cache the solution should be applied on if any |