diff options
author | Julian Andres Klode <jak@debian.org> | 2016-10-02 17:20:33 +0200 |
---|---|---|
committer | Julian Andres Klode <jak@debian.org> | 2016-10-04 19:30:30 +0200 |
commit | 0ecceb5bb9cc8727c117195945b7116aceb984fe (patch) | |
tree | 76dd5b2e352b6255699956e21d4e6d02548bed06 /apt-pkg/contrib/fileutl.h | |
parent | 1f7c56acc6b36b7869294941c8eba2b026eaaeb1 (diff) |
Do not read stderr from proxy autodetection scripts
This fixes a regression introduced in
commit 8f858d560e3b7b475c623c4e242d1edce246025a
don't leak FD in AutoProxyDetect command return parsing
which accidentally made the proxy autodetection code also read
the scripts output on stderr, not only on stdout when it switched
the code from popen() to Popen().
Reported-By: Tim Small <tim@seoss.co.uk>
Diffstat (limited to 'apt-pkg/contrib/fileutl.h')
-rw-r--r-- | apt-pkg/contrib/fileutl.h | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/apt-pkg/contrib/fileutl.h b/apt-pkg/contrib/fileutl.h index 15665f8b5..dddeb70f5 100644 --- a/apt-pkg/contrib/fileutl.h +++ b/apt-pkg/contrib/fileutl.h @@ -248,8 +248,11 @@ std::vector<std::string> Glob(std::string const &pattern, int flags=0); * \param Child a reference to the integer that stores the child pid * Note that you must call ExecWait() or similar to cleanup * \param Mode is either FileFd::ReadOnly or FileFd::WriteOnly + * \param CaptureStderr True if we should capture stderr in addition to stdout. + * (default: True). * \return true on success, false on failure with _error set */ +bool Popen(const char* Args[], FileFd &Fd, pid_t &Child, FileFd::OpenMode Mode, bool CaptureStderr); bool Popen(const char* Args[], FileFd &Fd, pid_t &Child, FileFd::OpenMode Mode); |