X-Git-Url: http://git.liburcu.org/?a=blobdiff_plain;f=liblttng-ust-comm%2Flttng-ust-comm.c;h=9baa4dc50d3a3a48fb429c1ce4e7026e5a1f5ae5;hb=refs%2Fheads%2Fdev;hp=7e55cff556c6ced0314329401fdbe866480cf160;hpb=e3feda7db3de3530e7c9c511536c36cccf317013;p=lttng-ust.git diff --git a/liblttng-ust-comm/lttng-ust-comm.c b/liblttng-ust-comm/lttng-ust-comm.c index 7e55cff5..9baa4dc5 100644 --- a/liblttng-ust-comm/lttng-ust-comm.c +++ b/liblttng-ust-comm/lttng-ust-comm.c @@ -255,7 +255,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"); } @@ -469,7 +471,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; }