X-Git-Url: http://git.liburcu.org/?a=blobdiff_plain;f=liblttng-ust-comm%2Flttng-ust-comm.c;h=21f48ed00bf00cfa10351df04950817bb968ea25;hb=7e3cfcbe9ccfef8837c42efcf5332035814415fc;hp=3277191c397f101e0cffa6dc30fdf0d3f9ed8049;hpb=c233fe111bc72058f209cd86a7b0807c3a123dfb;p=lttng-ust.git diff --git a/liblttng-ust-comm/lttng-ust-comm.c b/liblttng-ust-comm/lttng-ust-comm.c index 3277191c..21f48ed0 100644 --- a/liblttng-ust-comm/lttng-ust-comm.c +++ b/liblttng-ust-comm/lttng-ust-comm.c @@ -248,7 +248,9 @@ ssize_t ustcomm_recv_unix_sock(int sock, void *buf, size_t len) msg.msg_iov = iov; msg.msg_iovlen = 1; - ret = recvmsg(sock, &msg, 0); + do { + ret = recvmsg(sock, &msg, 0); + } while (ret < 0 && errno == EINTR); if (ret < 0) { perror("recvmsg"); } @@ -462,7 +464,10 @@ int ustcomm_recv_fd(int sock) msg.msg_control = recv_fd; msg.msg_controllen = sizeof(recv_fd); - if ((ret = recvmsg(sock, &msg, 0)) < 0) { + do { + ret = recvmsg(sock, &msg, 0); + } while (ret < 0 && errno == EINTR); + if (ret < 0) { perror("recvmsg"); goto end; }