From: Mathieu Desnoyers Date: Mon, 11 Nov 2013 15:51:58 +0000 (-0500) Subject: Comment why we cannot rmdir the lttng and relayd rundir X-Git-Tag: v2.4.0-rc1~61 X-Git-Url: https://git.lttng.org./?a=commitdiff_plain;h=dcbcae3e305b65785461b4c7bbc60864e03208a2;p=lttng-tools.git Comment why we cannot rmdir the lttng and relayd rundir Signed-off-by: Mathieu Desnoyers --- 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");