From 231eb9eb33b929ec20f2453f3a397e44e98143f3 Mon Sep 17 00:00:00 2001 From: Emily Albini Date: Fri, 17 Apr 2026 09:32:18 +0200 Subject: [PATCH] agent: fix missing return --- agent/src/exec.rs | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/agent/src/exec.rs b/agent/src/exec.rs index d8e2aa5a..bcdf320c 100644 --- a/agent/src/exec.rs +++ b/agent/src/exec.rs @@ -289,14 +289,15 @@ fn run_common( ) .unwrap(); - /* - * Only send an exit notification if this is the primary task - * process. - */ - if ab.bgproc.is_none() { - tx.blocking_send(ab.exit(&start, &end, i32::MAX)).unwrap(); + if ab.bgproc.is_some() { + /* + * No further notifications are required for background + * processes. + */ + return; } + tx.blocking_send(ab.exit(&start, &end, i32::MAX)).unwrap(); false } Ok(es) => { @@ -317,6 +318,7 @@ fn run_common( * No further notifications are required for background * processes. */ + return; } if let Some(sig) = es.signal() {