+ ret_code = trigger_modifies_event_notifier(trigger, &must_update_event_notifier);
+ if (ret_code != LTTNG_OK) {
+ ERR("Failed to determine if event modifies event notifiers: trigger name = '%s', trigger owner uid = %d, error code = %d",
+ trigger_name, (int) trigger_owner, ret_code);
+ goto end;
+ }
+
+ ret_code = notification_thread_command_unregister_trigger(notification_thread,
+ trigger);
+ if (ret_code != LTTNG_OK) {
+ ERR("Failed to unregister trigger from notification thread: trigger name = '%s', trigger owner uid = %d, error code = %d",
+ trigger_name, (int) trigger_owner, ret_code);
+ }
+
+ /*
+ * Synchronize tracers if the trigger removes an event notifier.
+ */
+ if (must_update_event_notifier) {
+ if (lttng_trigger_get_underlying_domain_type_restriction(
+ trigger) == LTTNG_DOMAIN_KERNEL) {
+
+ ret_code = kernel_unregister_event_notifier(
+ trigger);
+ } else {
+ ust_app_global_update_all_event_notifier_rules();
+ }
+ }
+