From: Jérémie Galarneau Date: Thu, 20 Oct 2016 19:45:42 +0000 (-0400) Subject: Fix: stop lttng-relayd threads on health thread error X-Git-Tag: v2.7.6~4 X-Git-Url: https://git.lttng.org./?a=commitdiff_plain;h=8d2bbe58c3962f8907329811060aadd8ddeaa429;p=lttng-tools.git Fix: stop lttng-relayd threads on health thread error The lttng-relayd health thread may fail to initialize for a variety of reason (notably, a too long unix domain socket address), which will cause it to never notify that it is ready. In such circumstances, the lttng-relayd command, in background or daemonize mode, will never return as the daemon's "readyness" will never be signaled. Signed-off-by: Jérémie Galarneau --- diff --git a/src/bin/lttng-relayd/health-relayd.c b/src/bin/lttng-relayd/health-relayd.c index be0b0b124..f1354c195 100644 --- a/src/bin/lttng-relayd/health-relayd.c +++ b/src/bin/lttng-relayd/health-relayd.c @@ -411,8 +411,9 @@ restart: new_sock = -1; } -exit: error: + lttng_relay_stop_threads(); +exit: if (err) { ERR("Health error occurred in %s", __func__); }