version 1.29, 2019/01/23 08:01:46 |
version 1.30, 2019/01/24 02:42:23 |
|
|
res = (f) (fd, s + pos, n - pos); |
res = (f) (fd, s + pos, n - pos); |
switch (res) { |
switch (res) { |
case -1: |
case -1: |
switch(errno) { |
if (errno == EINTR) { |
case EINTR: |
|
/* possible SIGALARM, update callback */ |
/* possible SIGALARM, update callback */ |
if (cb != NULL && cb(cb_arg, 0) == -1) { |
if (cb != NULL && cb(cb_arg, 0) == -1) { |
errno = EINTR; |
errno = EINTR; |
return pos; |
return pos; |
} |
} |
continue; |
continue; |
case EAGAIN: |
} else if (errno == EAGAIN || errno == EWOULDBLOCK) { |
(void)poll(&pfd, 1, -1); |
(void)poll(&pfd, 1, -1); |
continue; |
continue; |
} |
} |
|
|
res = (f) (fd, iov, iovcnt); |
res = (f) (fd, iov, iovcnt); |
switch (res) { |
switch (res) { |
case -1: |
case -1: |
switch(errno) { |
if (errno == EINTR) { |
case EINTR: |
|
/* possible SIGALARM, update callback */ |
/* possible SIGALARM, update callback */ |
if (cb != NULL && cb(cb_arg, 0) == -1) { |
if (cb != NULL && cb(cb_arg, 0) == -1) { |
errno = EINTR; |
errno = EINTR; |
return pos; |
return pos; |
} |
} |
continue; |
continue; |
case EAGAIN: |
} else if (errno == EAGAIN || errno == EWOULDBLOCK) { |
(void)poll(&pfd, 1, -1); |
(void)poll(&pfd, 1, -1); |
continue; |
continue; |
} |
} |