From ee5e7c04c7698d48d9c57afd3e9fa091a8b3fa3d Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Wed, 8 Apr 2026 21:21:37 +0000 Subject: [PATCH 1/2] Initial plan From 0ceef7bf03335388e66485892841619f38ebc316 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Wed, 8 Apr 2026 21:26:34 +0000 Subject: [PATCH 2/2] fix: avoid fatal cleanup crash for exported bash functions Agent-Logs-Url: https://github.com/pirate/bash-utils/sessions/84253c74-f260-4ef3-98d4-7294bc7728d7 Co-authored-by: pirate <511499+pirate@users.noreply.github.com> --- util/logging.sh | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/util/logging.sh b/util/logging.sh index 07f6d1c..caccd09 100644 --- a/util/logging.sh +++ b/util/logging.sh @@ -130,8 +130,11 @@ function fatal { [ ! -z "${STATUS##*[!0-9]*}" ] || STATUS=3 # kill all child processes in current subshell - jobs -p | xargs 'kill -9 --' 2>/dev/null + local -a CHILD_PIDS=() + mapfile -t CHILD_PIDS < <(jobs -p 2>/dev/null || true) + if (( "${#CHILD_PIDS[@]}" )); then + kill -9 -- "${CHILD_PIDS[@]}" 2>/dev/null || true + fi exit $STATUS } -