X-Git-Url: https://git.cweiske.de/enigma2.git/blobdiff_plain/62b8a649fcae500c983215fac2e5202916c0195f..5e05afa7dbc5acfc92a158dcc88b0be12c52af62:/lib/base/buffer.cpp diff --git a/lib/base/buffer.cpp b/lib/base/buffer.cpp index 9839b3e8..5dfdfad5 100644 --- a/lib/base/buffer.cpp +++ b/lib/base/buffer.cpp @@ -1,8 +1,9 @@ #include #include -#include +#include +#include +#include #include -#include void eIOBuffer::removeblock() { @@ -127,8 +128,11 @@ int eIOBuffer::fromfile(int fd, int len) tc=allocationsize-buffer.back().len; r=::read(fd, buffer.back().data+buffer.back().len, tc); buffer.back().len+=r; - if (r < 0 && errno != EWOULDBLOCK ) - eDebug("couldn't read: %m"); + if (r < 0) + { + if (errno != EWOULDBLOCK && errno != EBUSY && errno != EINTR) + eDebug("couldn't read: %m"); + } else { len-=r; @@ -155,7 +159,7 @@ int eIOBuffer::tofile(int fd, int len) w=::write(fd, buffer.front().data+ptr, tc); if (w < 0) { - if (errno != EWOULDBLOCK) + if (errno != EWOULDBLOCK && errno != EBUSY && errno != EINTR) eDebug("write: %m"); w=0; }