summaryrefslogtreecommitdiff
path: root/apt-pkg/acquire.h
diff options
context:
space:
mode:
authorMichael Vogt <mvo@ubuntu.com>2015-11-27 12:07:48 +0100
committerMichael Vogt <mvo@ubuntu.com>2015-11-27 12:10:57 +0100
commita416a90b631a430306df6ed3fa1d4f3a1bdc7949 (patch)
treec25476e2c0b342538e71acb0ea11b8da08995c3b /apt-pkg/acquire.h
parent4c482ac554e1b533d98661de8585d5861d9ac562 (diff)
Deal with killed acquire methods properly instead of hanging
This fixes a regression caussed by commit 95278287f4e1eeaf5d96749d6fc9bfc53fb400d0 that moved the error detection of RunFds() later into the loop. However this broke detecting issues like dead acquire methods. Instead of relying on the global error state (which is bad) we now pass a boolean value back from RunFds() and break on false. Closes: #806406
Diffstat (limited to 'apt-pkg/acquire.h')
-rw-r--r--apt-pkg/acquire.h9
1 files changed, 8 insertions, 1 deletions
diff --git a/apt-pkg/acquire.h b/apt-pkg/acquire.h
index 3e5ca41cd..f4019d556 100644
--- a/apt-pkg/acquire.h
+++ b/apt-pkg/acquire.h
@@ -236,8 +236,15 @@ class pkgAcquire
*
* \param WSet The set of file descriptors that are ready for
* output.
+ *
+ * \return false if there is an error condition on one of the fds
*/
- virtual void RunFds(fd_set *RSet,fd_set *WSet);
+ bool RunFdsSane(fd_set *RSet,fd_set *WSet);
+
+ // just here for compatbility, needs to be removed on the next
+ // ABI/API break. RunFdsSane() is what should be used as it
+ // returns if there is an error condition on one of the fds
+ virtual void RunFds(fd_set *RSet,fd_set *WSet);
/** \brief Check for idle queues with ready-to-fetch items.
*