X-Git-Url: http://git.lttng.org/?a=blobdiff_plain;ds=sidebyside;f=liblttng-ust-comm%2Flttng-ust-comm.c;h=2332dbf1a383d2b2b6e1500fb604039e53ab72e9;hb=51d9d699fd6ea1da04af9e70b1e624eeaa99659f;hp=b90f5fe7baa0f64f8374bed6e367d96939baa312;hpb=e6973a8909554c1b1d812f4f07d8806b87cad394;p=lttng-ust.git diff --git a/liblttng-ust-comm/lttng-ust-comm.c b/liblttng-ust-comm/lttng-ust-comm.c index b90f5fe7..2332dbf1 100644 --- a/liblttng-ust-comm/lttng-ust-comm.c +++ b/liblttng-ust-comm/lttng-ust-comm.c @@ -284,7 +284,9 @@ ssize_t ustcomm_send_unix_sock(int sock, void *buf, size_t len) * by ignoring SIGPIPE, but we don't have this luxury on the * libust side. */ - ret = sendmsg(sock, &msg, MSG_NOSIGNAL); + do { + ret = sendmsg(sock, &msg, MSG_NOSIGNAL); + } while (ret < 0 && errno == EINTR); if (ret < 0 && errno != EPIPE) { perror("sendmsg"); } @@ -347,7 +349,9 @@ ssize_t ustcomm_send_fds_unix_sock(int sock, void *buf, int *fds, size_t nb_fd, msg.msg_iov = iov; msg.msg_iovlen = 1; - ret = sendmsg(sock, &msg, 0); + do { + ret = sendmsg(sock, &msg, MSG_NOSIGNAL); + } while (ret < 0 && errno == EINTR); if (ret < 0 && errno != EPIPE) { perror("sendmsg"); }