diff options
author | YOSHINO Yoshihito <yy.y.ja.jp@gmail.com> | 2012-05-07 21:16:25 +0200 |
---|---|---|
committer | David Kalnischkies <kalnischkies@gmail.com> | 2012-05-07 21:16:25 +0200 |
commit | ee7af1bd58a717601fc30b5e7702d688749d2419 (patch) | |
tree | ac70bb4893dbfccfb2befb7d9579f67a18684838 /apt-pkg | |
parent | a00a9b44a1e0abf944d88c36ceaac8afdd207dcb (diff) |
* apt-pkg/acquire-worker.cc:
- revert the use of FileFd::Write in OutFdReady as we don't want error
reports about EAGAIN here as we retry later. Thanks to YOSHINO Yoshihito
for the report. (Closes: #671721)
Diffstat (limited to 'apt-pkg')
-rw-r--r-- | apt-pkg/acquire-worker.cc | 13 |
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; |