From: Jérémie Galarneau Date: Wed, 27 Nov 2019 05:30:24 +0000 (-0500) Subject: relayd: track the live viewer worker thread's epoll fd X-Git-Tag: v2.12.0-rc1~55 X-Git-Url: https://git.lttng.org./?a=commitdiff_plain;h=35bc1f58f7076171ab8957c2472b056fa9c6ea60;p=lttng-tools.git relayd: track the live viewer worker thread's epoll fd Create the live worker threads' epoll fd through the fd_tracker_util_poll_create() util. This causes the resulting fd (in epoll mode) to be tracked by the fd tracker. Signed-off-by: Jérémie Galarneau Change-Id: I60b386b90e274283c566d94cfd4abcf57e0c1985 --- diff --git a/src/bin/lttng-relayd/live.c b/src/bin/lttng-relayd/live.c index 419a8ebe4..d318159ca 100644 --- a/src/bin/lttng-relayd/live.c +++ b/src/bin/lttng-relayd/live.c @@ -461,15 +461,6 @@ error: return ret; } -/* - * Create a poll set with O_CLOEXEC and add the thread quit pipe to the set. - */ -static -int create_thread_poll_set(struct lttng_poll_event *events, int size) -{ - return create_named_thread_poll_set(events, size, "Unknown epoll"); -} - /* * Check if the thread quit pipe was triggered. * @@ -2187,7 +2178,8 @@ void *thread_worker(void *data) goto viewer_connections_ht_error; } - ret = create_thread_poll_set(&events, 2); + ret = create_named_thread_poll_set(&events, 2, + "Live viewer worker thread epoll"); if (ret < 0) { goto error_poll_create; } @@ -2310,7 +2302,7 @@ restart: exit: error: - lttng_poll_clean(&events); + (void) fd_tracker_util_poll_clean(the_fd_tracker, &events); /* Cleanup remaining connection object. */ rcu_read_lock();