From dcbcae3e305b65785461b4c7bbc60864e03208a2 Mon Sep 17 00:00:00 2001 From: Mathieu Desnoyers Date: Mon, 11 Nov 2013 10:51:58 -0500 Subject: [PATCH] Comment why we cannot rmdir the lttng and relayd rundir Signed-off-by: Mathieu Desnoyers --- src/bin/lttng-relayd/health-relayd.c | 5 +++++ src/bin/lttng-sessiond/main.c | 6 ++++++ 2 files changed, 11 insertions(+) diff --git a/src/bin/lttng-relayd/health-relayd.c b/src/bin/lttng-relayd/health-relayd.c index 61e50367c..6b4a742f8 100644 --- a/src/bin/lttng-relayd/health-relayd.c +++ b/src/bin/lttng-relayd/health-relayd.c @@ -385,6 +385,11 @@ error: } } + /* + * We do NOT rmdir rundir nor the relayd path because there are + * other processes using them. + */ + lttng_poll_clean(&events); rcu_unregister_thread(); diff --git a/src/bin/lttng-sessiond/main.c b/src/bin/lttng-sessiond/main.c index a790844a1..54b47567d 100644 --- a/src/bin/lttng-sessiond/main.c +++ b/src/bin/lttng-sessiond/main.c @@ -499,6 +499,12 @@ static void cleanup(void) DBG("Removing directory %s", path); (void) rmdir(path); + /* + * We do NOT rmdir rundir because there are other processes + * using it, for instance lttng-relayd, which can start in + * parallel with this teardown. + */ + free(rundir); DBG("Cleaning up all sessions"); -- 2.34.1