From aa91fbc56d63f8d75661a68b68f4052d3c0dba45 Mon Sep 17 00:00:00 2001 From: =?utf8?q?J=C3=A9r=C3=A9mie=20Galarneau?= Date: Wed, 27 Nov 2019 01:36:34 -0500 Subject: [PATCH 1/1] relayd: track the health thread's poll fd with fd-tracker MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit 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 Change-Id: I81ba9cbe69d885dbdade03e581a4d69572de50eb --- src/bin/lttng-relayd/health-relayd.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/bin/lttng-relayd/health-relayd.c b/src/bin/lttng-relayd/health-relayd.c index bf3bb8d82..2e8eb8e48 100644 --- a/src/bin/lttng-relayd/health-relayd.c +++ b/src/bin/lttng-relayd/health-relayd.c @@ -319,8 +319,10 @@ void *thread_manage_health(void *data) 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; @@ -472,7 +474,7 @@ exit: * other processes using them. */ - lttng_poll_clean(&events); + (void) fd_tracker_util_poll_clean(the_fd_tracker, &events); rcu_unregister_thread(); return NULL; -- 2.34.1