tests: use --background for session daemon
[lttng-tools.git] / src / bin / lttng-sessiond / ht-cleanup.c
index 4eb0c003437574e8790fa95ce02d7cac3ef09ec2..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;
 
@@ -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;
                        }
This page took 0.023858 seconds and 4 git commands to generate.