X-Git-Url: https://git.lttng.org/?p=lttng-tools.git;a=blobdiff_plain;f=src%2Fbin%2Flttng-sessiond%2Fht-cleanup.c;h=48b0be6e4c3b6cbfb829fb563ec101fdd1b846ad;hp=890c9a8215e26967c5ff6b42b5cf171295cdc306;hb=6cd525e813795a1d5e38feac8dedf2c73ffb1274;hpb=33b141366b29aa086ecb8d06808d7ba91f83cb1e diff --git a/src/bin/lttng-sessiond/ht-cleanup.c b/src/bin/lttng-sessiond/ht-cleanup.c index 890c9a821..48b0be6e4 100644 --- a/src/bin/lttng-sessiond/ht-cleanup.c +++ b/src/bin/lttng-sessiond/ht-cleanup.c @@ -28,6 +28,7 @@ void *thread_ht_cleanup(void *data) { int ret, i, pollfd, err = -1; + ssize_t size_ret; uint32_t revents, nb_fd; struct lttng_poll_event events; @@ -100,11 +101,10 @@ restart: goto error; } - do { - /* Get socket from dispatch thread. */ - ret = read(ht_cleanup_pipe[0], &ht, sizeof(ht)); - } while (ret < 0 && errno == EINTR); - if (ret < 0 || ret < sizeof(ht)) { + /* Get socket from dispatch thread. */ + size_ret = lttng_read(ht_cleanup_pipe[0], &ht, + sizeof(ht)); + if (size_ret < sizeof(ht)) { PERROR("ht cleanup notify pipe"); goto error; }