From 68091961a7ea1870fcfb5220207c95d0727e70f9 Mon Sep 17 00:00:00 2001 From: Richard Hansen Date: Mon, 3 Feb 2025 18:26:55 -0500 Subject: [PATCH] tap: close fd 3 before invoking the test script * lib/tap-driver.sh: Close file descriptor 3 before invoking the test script to avoid potential conflicts with the test script. --- lib/tap-driver.sh | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/lib/tap-driver.sh b/lib/tap-driver.sh index 75e767605..0bd79a6d4 100755 --- a/lib/tap-driver.sh +++ b/lib/tap-driver.sh @@ -23,7 +23,7 @@ # bugs to or send patches to # . -scriptversion=2024-12-03.03; # UTC +scriptversion=2025-02-03.01; # UTC # Make unconditional expansion of undefined variables an error. This # helps a lot in preventing typo-related bugs. @@ -144,7 +144,7 @@ fi else exec 2>&3 fi - "$@" + "$@" 3>&- echo $? ) | LC_ALL=C ${AM_TAP_AWK-awk} \ -v me="$me" \ @@ -638,8 +638,6 @@ exit 0 } # End of "BEGIN" block. ' - -# TODO: document that we consume the file descriptor 3 :-( } 3>"$log_file" test $? -eq 0 || fatal "I/O or internal error" -- 2.47.3