Create the relayd live connection pipe through the
fd_tracker_util_pipe_open_cloexec() function which wraps
utils_create_pipe_cloexec(), but tracks the resulting file descriptor.
The close of the pipe is also performed through the fd tracker.
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
Change-Id: I967c2fbecfb5dacfb8c41cad113604bad78dad65
#include <common/sessiond-comm/relayd.h>
#include <common/uri.h>
#include <common/utils.h>
#include <common/sessiond-comm/relayd.h>
#include <common/uri.h>
#include <common/utils.h>
+#include <common/fd-tracker/utils.h>
#include "cmd.h"
#include "live.h"
#include "cmd.h"
#include "live.h"
lttng_ht_destroy(viewer_connections_ht);
viewer_connections_ht_error:
/* Close relay conn pipes */
lttng_ht_destroy(viewer_connections_ht);
viewer_connections_ht_error:
/* Close relay conn pipes */
- utils_close_pipe(live_conn_pipe);
+ (void) fd_tracker_util_pipe_close(the_fd_tracker, live_conn_pipe);
if (err) {
DBG("Viewer worker thread exited with error");
}
if (err) {
DBG("Viewer worker thread exited with error");
}
*/
static int create_conn_pipe(void)
{
*/
static int create_conn_pipe(void)
{
- return utils_create_pipe_cloexec(live_conn_pipe);
+ return fd_tracker_util_pipe_open_cloexec(the_fd_tracker,
+ "Live connection pipe", live_conn_pipe);
}
int relayd_live_join(void)
}
int relayd_live_join(void)