From 5f2bc6a2d309f0a800504e0fbab821914ed9956c Mon Sep 17 00:00:00 2001 From: Jason Dellaluce Date: Tue, 11 Oct 2022 15:48:16 +0000 Subject: [PATCH] fix(userspace/falco): properly handle termination at source opening failures Signed-off-by: Jason Dellaluce --- userspace/falco/app_actions/process_events.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/userspace/falco/app_actions/process_events.cpp b/userspace/falco/app_actions/process_events.cpp index 07f24cda9c1..de55e219fba 100644 --- a/userspace/falco/app_actions/process_events.cpp +++ b/userspace/falco/app_actions/process_events.cpp @@ -374,6 +374,7 @@ application::run_result application::process_events() // note: we don't return here because we need to reach // the thread termination loop below to make sure all // already-spawned threads get terminated gracefully + ctx.finished->store(true, std::memory_order_seq_cst); break; } @@ -395,6 +396,7 @@ application::run_result application::process_events() // the thread termination loop below to make sure all // already-spawned threads get terminated gracefully ctx.res = run_result::fatal(e.what()); + ctx.finished->store(true, std::memory_order_seq_cst); break; } }