From: Jérémie Galarneau Date: Wed, 27 Nov 2019 06:36:34 +0000 (-0500) Subject: relayd: track the health thread's poll fd with fd-tracker X-Git-Tag: v2.12.0-rc1~48 X-Git-Url: https://git.lttng.org./?a=commitdiff_plain;h=aa91fbc56d63f8d75661a68b68f4052d3c0dba45;p=lttng-tools.git relayd: track the health thread's poll fd with fd-tracker 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 --- 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;