SoW-2019-0002: Dynamic Snapshot
[lttng-tools.git] / src / bin / lttng-sessiond / main.c
index 55e0ad3d7a28623cb6f1bdad7ccc04e289f410f8..965625c9bb8ad7f70c74a61422b8e299ce164648 100644 (file)
@@ -314,6 +314,9 @@ static void sessiond_cleanup(void)
 
        pthread_mutex_destroy(&session_list->lock);
 
+       DBG("Cleaning up all trigger agents");
+       trigger_agent_ht_clean();
+
        DBG("Cleaning up all agent apps");
        agent_app_ht_clean();
        DBG("Closing all UST sockets");
@@ -1302,6 +1305,7 @@ int main(int argc, char **argv)
        struct lttng_thread *notification_thread = NULL;
        struct lttng_thread *register_apps_thread = NULL;
 
+       logger_set_thread_name("Main", false);
        init_kernel_workarounds();
 
        rcu_register_thread();
@@ -1538,6 +1542,11 @@ int main(int argc, char **argv)
                goto stop_threads;
        }
 
+       if (trigger_agent_ht_alloc()) {
+               ERR("Failed to allocate trigger agent hash table");
+               retval = -1;
+               goto stop_threads;
+       }
        /*
         * These actions must be executed as root. We do that *after* setting up
         * the sockets path because we MUST make the check for another daemon using
@@ -1635,7 +1644,8 @@ int main(int argc, char **argv)
        notification_thread_handle = notification_thread_handle_create(
                        ust32_channel_monitor_pipe,
                        ust64_channel_monitor_pipe,
-                       kernel_channel_monitor_pipe);
+                       kernel_channel_monitor_pipe,
+                       kernel_get_notification_fd());
        if (!notification_thread_handle) {
                retval = -1;
                ERR("Failed to create notification thread shared data");
This page took 0.024158 seconds and 5 git commands to generate.