X-Git-Url: http://git.lttng.org/?p=lttng-tools.git;a=blobdiff_plain;f=src%2Fbin%2Flttng-sessiond%2Fust-app.c;h=38d1d78713e6446dca9b55b001ccfbee376c88b3;hp=3a899775dcb62f15f75964626932cc535a570a71;hb=5d4193fd103743e68020148db71469b907020140;hpb=993578ff7c4fce4d9a834918d192f896ba3021c7 diff --git a/src/bin/lttng-sessiond/ust-app.c b/src/bin/lttng-sessiond/ust-app.c index 3a899775d..38d1d7871 100644 --- a/src/bin/lttng-sessiond/ust-app.c +++ b/src/bin/lttng-sessiond/ust-app.c @@ -3885,6 +3885,13 @@ int ust_app_setup_event_notifier_group(struct ust_app *app) goto error; } + ret = lttng_pipe_write_close(app->event_notifier_group.event_pipe); + if (ret) { + ERR("Failed to close write end of the application's event source pipe: app = '%s' (ppid = %d)", + app->name, app->ppid); + goto error; + } + lttng_ret = notification_thread_command_add_tracer_event_source( notification_thread_handle, lttng_pipe_get_readfd(app->event_notifier_group.event_pipe), @@ -4314,16 +4321,12 @@ void ust_app_clean_list(void) if (ust_app_ht_by_notify_sock) { cds_lfht_for_each_entry(ust_app_ht_by_notify_sock->ht, &iter.iter, app, notify_sock_n.node) { - struct cds_lfht_node *node; - struct ust_app *app; - - node = cds_lfht_iter_get_node(&iter.iter); - if (!node) { - continue; - } + /* + * Assert that all notifiers are gone as all triggers + * are unregistered prior to this clean-up. + */ + assert(lttng_ht_get_count(app->token_to_event_notifier_rule_ht) == 0); - app = container_of(node, struct ust_app, - notify_sock_n.node); ust_app_notify_sock_unregister(app->notify_sock); } }