X-Git-Url: http://git.efficios.com/?p=lttng-tools.git;a=blobdiff_plain;f=src%2Fbin%2Flttng-sessiond%2Fmain.c;h=965625c9bb8ad7f70c74a61422b8e299ce164648;hp=55e0ad3d7a28623cb6f1bdad7ccc04e289f410f8;hb=1831ae68b70dece8e9b847081526495adbbf05e5;hpb=25357057de5ae4dd2a572e8f9b893c1b90cbd60a diff --git a/src/bin/lttng-sessiond/main.c b/src/bin/lttng-sessiond/main.c index 55e0ad3d7..965625c9b 100644 --- a/src/bin/lttng-sessiond/main.c +++ b/src/bin/lttng-sessiond/main.c @@ -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");