13 while (
s == -1 && errno == EINTR);
31 std::vector<iovec> bufs(buffers);
33 bufs[
i].iov_len = into[
i].
size();
34 bufs[
i].iov_base = (caddr_t)into[
i].
data();
40 while (
n == -1 && errno == EINTR);
57 while (
s == -1 && errno == EINTR);
59 if (
s == -1 && errno != EWOULDBLOCK)
62 return s >= 0 ?
s : 0;
75 std::vector<iovec> bufs(buffers);
77 bufs[
i].iov_len = from[
i].
size();
78 bufs[
i].iov_base = (caddr_t)from[
i].
data();
84 while (
n == -1 && errno == EINTR);
103 if ((
mode = fcntl(
fd(), F_GETFL, 0)) == -1 || fcntl(
fd(), F_SETFL, (
mode & off) | on) == -1)
104 throwStorageError(
"FileSetBlockingError",
"Calling IOChannel::setBlocking()",
"fcntl()", errno);
105 #elif defined FIONBIO
107 if (ioctl(
fd(), FIONBIO, &
value) == -1)
108 throwStorageError(
"FileSetBlockingError",
"Calling IOChannel::setBlocking()",
"ioctl()", errno);
115 if ((
mode = fcntl(
fd(), F_GETFL, 0)) == -1)
116 throwStorageError(
"FileIsBlockingError",
"Calling IOChannel::isBlocking()",
"fcntl()", errno);
119 #else // ! O_NONBLOCK