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=4eb0c003437574e8790fa95ce02d7cac3ef09ec2;hb=6cd525e813795a1d5e38feac8dedf2c73ffb1274;hpb=8782cc7477fae212607b9fd6395a4b2e2d3357ed diff --git a/src/bin/lttng-sessiond/ht-cleanup.c b/src/bin/lttng-sessiond/ht-cleanup.c index 4eb0c0034..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; @@ -36,7 +37,7 @@ void *thread_ht_cleanup(void *data) rcu_register_thread(); rcu_thread_online(); - health_register(health_sessiond, HEALTH_TYPE_HT_CLEANUP); + health_register(health_sessiond, HEALTH_SESSIOND_TYPE_HT_CLEANUP); health_code_update(); @@ -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; }