From 0a24927140f2023d3919dde6b2ca9dc7a0260964 Mon Sep 17 00:00:00 2001 From: Martin Schulze Date: Fri, 21 Aug 2020 23:10:05 +0200 Subject: [PATCH] Fix todo --- lib/bats-core/semaphore.bash | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/bats-core/semaphore.bash b/lib/bats-core/semaphore.bash index 59695d6704..8e8ac890d5 100644 --- a/lib/bats-core/semaphore.bash +++ b/lib/bats-core/semaphore.bash @@ -33,8 +33,9 @@ bats_semaphore_release_wrapper() { mkdir -p "$output_dir" "$@" 2>"$output_dir/stderr" >"$output_dir/stdout" - # TODO: why is this necessary? shouldn't the EXIT trap do this already? does it work with signals then? + # bash bug: the exit trap is not called for the background process bats_semaphore_release_slot + trap '' EXIT # avoid calling release twice } # block until a semaphore slot becomes free