From 7145f5e9af16907c65a514fe9112e99564cf6333 Mon Sep 17 00:00:00 2001 From: =?utf8?q?J=C3=A9r=C3=A9mie=20Galarneau?= Date: Thu, 30 Jan 2020 01:51:10 -0500 Subject: [PATCH] relayd: register fd tracker instance to all created trace chunks MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Provide a reference to 'the_fd_tracker' to trace chunks during their creation. This causes file descriptors created through the relay daemon's trace chunks to be tracked by the daemon's fd tracker. Signed-off-by: Jérémie Galarneau Change-Id: I9c96851ef06bb7f0be0c7f3e8b7f01638f13fbda --- src/bin/lttng-relayd/main.c | 1 + src/bin/lttng-relayd/session.c | 2 ++ 2 files changed, 3 insertions(+) diff --git a/src/bin/lttng-relayd/main.c b/src/bin/lttng-relayd/main.c index 00292a02d..4a2258d34 100644 --- a/src/bin/lttng-relayd/main.c +++ b/src/bin/lttng-relayd/main.c @@ -2724,6 +2724,7 @@ static int relay_create_trace_chunk(const struct lttcomm_relayd_hdr *recv_hdr, reply_code = LTTNG_ERR_NOMEM; goto end; } + lttng_trace_chunk_set_fd_tracker(chunk, the_fd_tracker); if (msg->override_name_length) { const char *name; diff --git a/src/bin/lttng-relayd/session.c b/src/bin/lttng-relayd/session.c index d83838521..5d5aa4c64 100644 --- a/src/bin/lttng-relayd/session.c +++ b/src/bin/lttng-relayd/session.c @@ -241,6 +241,8 @@ static int session_set_anonymous_chunk(struct relay_session *session) ret = -1; goto end; } + + lttng_trace_chunk_set_fd_tracker(chunk, the_fd_tracker); output_directory = NULL; session->current_trace_chunk = chunk; chunk = NULL; -- 2.34.1