-#ifdef LTTNGTOP_MMAP_LIVE
- if (opt_textdump) {
- signal(SIGTERM, handle_textdump_sigterm);
- signal(SIGINT, handle_textdump_sigterm);
- }
- mmap_live_loop(bt_ctx);
- pthread_join(timer_thread, NULL);
- quit = 1;
- pthread_join(display_thread, NULL);
-
- lttng_stop_tracing("test");
- lttng_destroy_session("test");
-
- goto end;
-#else
- fprintf(stderr, "[ERROR] Mmap live support not compiled, specify a "
- "trace directory or -r <relayd hostname/IP>\n");
- usage(stdout);
- ret = -1;
- goto end;
-#endif /* LTTNGTOP_MMAP_LIVE */
- } else if (!opt_input_path && remote_live) {
+ ret = create_live_local_session(&opt_relay_hostname,
+ &live_session_name, 0);
+ if (ret < 0)
+ goto end;
+ remote_live = 1;
+ }
+ if (!opt_input_path && remote_live) {