Fix: improve lttng with live by spawning relayd
[lttng-tools.git] / src / bin / lttng / commands / create.c
index 2e03373266c2ca9c3d10f469bfb5da9ef3a5dfb6..a5f92f14a31c37ddddce57a925f4f2772cf3e38d 100644 (file)
@@ -376,6 +376,16 @@ static int create_session(void)
                }
                ret = lttng_create_session_snapshot(session_name, snapshot_url);
        } else if (opt_live_timer) {
+               const char *pathname;
+
+               if (opt_relayd_path) {
+                       pathname = opt_relayd_path;
+               } else {
+                       pathname = INSTALL_BIN_PATH "/lttng-relayd";
+               }
+               if (!check_relayd() && spawn_relayd(pathname, 0) < 0) {
+                       goto error;
+               }
                ret = lttng_create_session_live(session_name, url, opt_live_timer);
        } else {
                ret = _lttng_create_session_ext(session_name, url, datetime, -1);
This page took 0.024129 seconds and 4 git commands to generate.