From 81714439fce5542a3ac052165150e38463bb5a2f Mon Sep 17 00:00:00 2001 From: =?utf8?q?J=C3=A9r=C3=A9mie=20Galarneau?= Date: Thu, 20 Oct 2016 15:45:42 -0400 Subject: [PATCH] Fix: stop lttng-relayd threads on health thread error MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit 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 --- src/bin/lttng-relayd/health-relayd.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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__); } -- 2.34.1