#include <lib/base/buffer.h>
#include <lib/base/eerror.h>
-#include <stdio.h>
+#include <cerrno>
+#include <cstdio>
+#include <cstring>
#include <unistd.h>
-#include <errno.h>
void eIOBuffer::removeblock()
{
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;
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;
}