Use lttng_read/lttng_write wrappers
[lttng-tools.git] / src / bin / lttng-sessiond / ht-cleanup.c
index 890c9a8215e26967c5ff6b42b5cf171295cdc306..48b0be6e4c3b6cbfb829fb563ec101fdd1b846ad 100644 (file)
@@ -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;
                        }
This page took 0.023866 seconds and 4 git commands to generate.