#include "connection.h"
#include "tracefile-array.h"
+static const char *help_msg =
+#ifdef LTTNG_EMBED_HELP
+#include <lttng-relayd.8.h>
+#else
+NULL
+#endif
+;
+
/* command line options */
char *opt_output_path;
static int opt_daemon, opt_background;
}
break;
case 'h':
- ret = utils_show_man_page(8, "lttng-relayd");
+ ret = utils_show_help(8, "lttng-relayd", help_msg);
if (ret) {
- ERR("Cannot view man page lttng-relayd(8)");
+ ERR("Cannot show --help for `lttng-relayd`");
perror("exec");
}
exit(EXIT_FAILURE);
health_code_update();
- while (!CMM_LOAD_SHARED(dispatch_thread_exit)) {
+ for (;;) {
health_code_update();
/* Atomically prepare the queue futex */
futex_nto1_prepare(&relay_conn_queue.futex);
+ if (CMM_LOAD_SHARED(dispatch_thread_exit)) {
+ break;
+ }
+
do {
health_code_update();