summaryrefslogtreecommitdiff
path: root/apt-pkg/acquire-worker.cc
diff options
context:
space:
mode:
authorMichael Vogt <egon@debian-devbox>2012-05-11 17:15:52 +0200
committerMichael Vogt <egon@debian-devbox>2012-05-11 17:15:52 +0200
commitc45798dbfce66810be2cea8d0051f429f342e90b (patch)
treeea9318770edf5699c885812ea1e87180d567ad02 /apt-pkg/acquire-worker.cc
parent3f81d67e1b732c1fdc8c17990249eda0fc2e09d6 (diff)
parent5ca28ebd7445774963d59b35f83c649e1ff61ca0 (diff)
merged from david
Diffstat (limited to 'apt-pkg/acquire-worker.cc')
-rw-r--r--apt-pkg/acquire-worker.cc13
1 files changed, 10 insertions, 3 deletions
diff --git a/apt-pkg/acquire-worker.cc b/apt-pkg/acquire-worker.cc
index 8bc043c58..d6db8bc02 100644
--- a/apt-pkg/acquire-worker.cc
+++ b/apt-pkg/acquire-worker.cc
@@ -511,10 +511,17 @@ bool pkgAcquire::Worker::QueueItem(pkgAcquire::Queue::QItem *Item)
/* */
bool pkgAcquire::Worker::OutFdReady()
{
- if (FileFd::Write(OutFd,OutQueue.c_str(),OutQueue.length()) == false)
+ int Res;
+ do
+ {
+ Res = write(OutFd,OutQueue.c_str(),OutQueue.length());
+ }
+ while (Res < 0 && errno == EINTR);
+
+ if (Res <= 0)
return MethodFailure();
-
- OutQueue.clear();
+
+ OutQueue.erase(0,Res);
if (OutQueue.empty() == true)
OutReady = false;