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.8.3~10 X-Git-Url: https://git.liburcu.org/?p=lttng-tools.git;a=commitdiff_plain;h=8a66b7eefa70f107a07b16c546b15b9e71f36b36 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 c6dd2e852..cff6c6e72 100644 --- a/src/bin/lttng-relayd/health-relayd.c +++ b/src/bin/lttng-relayd/health-relayd.c @@ -409,8 +409,9 @@ restart: new_sock = -1; } -exit: error: + lttng_relay_stop_threads(); +exit: if (err) { ERR("Health error occurred in %s", __func__); }