aboutsummaryrefslogtreecommitdiffstats
path: root/tools/blktap2
diff options
context:
space:
mode:
Diffstat (limited to 'tools/blktap2')
-rw-r--r--tools/blktap2/control/tap-ctl-ipc.c10
1 files changed, 8 insertions, 2 deletions
diff --git a/tools/blktap2/control/tap-ctl-ipc.c b/tools/blktap2/control/tap-ctl-ipc.c
index cc6160e9da..c8aad1ccda 100644
--- a/tools/blktap2/control/tap-ctl-ipc.c
+++ b/tools/blktap2/control/tap-ctl-ipc.c
@@ -64,8 +64,11 @@ tap_ctl_read_message(int fd, tapdisk_message_t *message, int timeout)
FD_SET(fd, &readfds);
ret = select(fd + 1, &readfds, NULL, NULL, t);
- if (ret == -1)
+ if (ret == -1) {
+ if (errno == EINTR)
+ continue;
break;
+ }
else if (FD_ISSET(fd, &readfds)) {
ret = read(fd, message + offset, len - offset);
if (ret <= 0)
@@ -114,8 +117,11 @@ tap_ctl_write_message(int fd, tapdisk_message_t *message, int timeout)
* bit more time than expected. */
ret = select(fd + 1, NULL, &writefds, NULL, t);
- if (ret == -1)
+ if (ret == -1) {
+ if (errno == EINTR)
+ continue;
break;
+ }
else if (FD_ISSET(fd, &writefds)) {
ret = write(fd, message + offset, len - offset);
if (ret <= 0)