relayd: track the health thread's poll fd with fd-tracker
authorJérémie Galarneau <jeremie.galarneau@efficios.com>
Wed, 27 Nov 2019 06:36:34 +0000 (01:36 -0500)
committerJérémie Galarneau <jeremie.galarneau@efficios.com>
Thu, 30 Jan 2020 06:55:34 +0000 (01:55 -0500)
Create the health thread's lttng_poll_event structure through
the fd-tracker to track the resulting file descriptor for
builds configured to use the epoll interface.

Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
Change-Id: I81ba9cbe69d885dbdade03e581a4d69572de50eb

src/bin/lttng-relayd/health-relayd.c

index bf3bb8d82cd48bc3fb4ff02a7b56b198aa7ba881..2e8eb8e483687fc0e677e7953307a8ce973ef721 100644 (file)
@@ -319,8 +319,10 @@ void *thread_manage_health(void *data)
                goto error;
        }
 
                goto error;
        }
 
-       /* Size is set to 1 for the consumer_channel pipe */
-       ret = lttng_poll_create(&events, 2, LTTNG_CLOEXEC);
+       /* Size is set to 2 for the unix socket and quit pipe. */
+       ret = fd_tracker_util_poll_create(the_fd_tracker,
+                       "Health management thread epoll", &events, 2,
+                       LTTNG_CLOEXEC);
        if (ret < 0) {
                ERR("Poll set creation failed");
                goto error;
        if (ret < 0) {
                ERR("Poll set creation failed");
                goto error;
@@ -472,7 +474,7 @@ exit:
         * other processes using them.
         */
 
         * other processes using them.
         */
 
-       lttng_poll_clean(&events);
+       (void) fd_tracker_util_poll_clean(the_fd_tracker, &events);
 
        rcu_unregister_thread();
        return NULL;
 
        rcu_unregister_thread();
        return NULL;
This page took 0.025995 seconds and 4 git commands to generate.