pthread_mutex_destroy(&session_list->lock);
- wait_consumer(&kconsumer_data);
- wait_consumer(&ustconsumer64_data);
- wait_consumer(&ustconsumer32_data);
-
DBG("Cleaning up all agent apps");
agent_app_ht_clean();
-
DBG("Closing all UST sockets");
ust_app_clean_list();
buffer_reg_destroy_registries();
+ close_consumer_sockets();
+
+ wait_consumer(&kconsumer_data);
+ wait_consumer(&ustconsumer64_data);
+ wait_consumer(&ustconsumer32_data);
+
if (is_root && !config.no_kernel) {
DBG2("Closing kernel fd");
if (kernel_tracer_fd >= 0) {
free(syscall_table);
}
- close_consumer_sockets();
-
/*
* We do NOT rmdir rundir because there are other processes
* using it, for instance lttng-relayd, which can start in
int ret;
gid_t gid;
- gid = utils_get_group_id(config.tracing_group_name.value);
+ ret = utils_get_group_id(config.tracing_group_name.value, true, &gid);
+ if (ret) {
+ /* Default to root group. */
+ gid = 0;
+ }
/* Set lttng run dir */
ret = chown(rundir, 0, gid);
goto error;
}
if (is_root) {
- ret = chown(path, 0, utils_get_group_id(config.tracing_group_name.value));
+ gid_t gid;
+
+ ret = utils_get_group_id(config.tracing_group_name.value, true,
+ &gid);
+ if (ret) {
+ /* Default to root group. */
+ gid = 0;
+ }
+
+ ret = chown(path, 0, gid);
if (ret < 0) {
ERR("Unable to set group on %s", path);
PERROR("chown");
goto unlock_session;
}
(void) cmd_stop_trace(session);
- (void) cmd_destroy_session(session,
- notification_thread_handle);
+ (void) cmd_destroy_session(session, notification_thread_handle,
+ NULL);
unlock_session:
session_unlock(session);
session_put(session);
&config);
}
+static void sessiond_uuid_log(void)
+{
+ char uuid_str[UUID_STR_LEN];
+
+ lttng_uuid_to_str(sessiond_uuid, uuid_str);
+ DBG("Starting lttng-sessiond {%s}", uuid_str);
+}
+
/*
* main
*/
set_clock_plugin_env();
sessiond_config_log(&config);
+ sessiond_uuid_log();
if (create_lttng_rundir()) {
retval = -1;