+2011-09-28 Stefano Lattarini <stefano.lattarini@gmail.com>
+
+ tap/awk: account for unusual korn shell signal handling behaviour
+ This change has been motivated by a testsuite failure on Debian
+ with the AT&T Korn Shell version 93u-1.
+ * lib/tap-driver.sh: Temporarily ignore some common signals when
+ waiting for the test command to complete, to avoid premature exit
+ in Korn shells that propagate to themselves signals that have
+ killed a child process.
+ See also related commit `v1.11-1342-g6321ad3'.
+
2011-09-28 Stefano Lattarini <stefano.lattarini@gmail.com>
tap/awk: handle exit statuses > 256 (seen on few korn shells)
fi
{
- { if test $merge -gt 0; then
+ (
+ # Ignore common signals (in this subshell only!) to avoid potential
+ # problems with Korn shells. Some Korn shells are known to propagate
+ # to themselves signals that have killed a child process they were
+ # waiting for (this is done at least for SIGINT -- and usually only
+ # for it in truth); this would cause a premature exit in this subshell,
+ # so that the awk script would never seen the exit status it expects
+ # on its last input line (and which is displayed below by the last
+ # `echo $?' command), and would thus die reporting an internal error.
+ # For more information, see the Autoconf manual and the threads:
+ # <http://lists.gnu.org/archive/html/bug-autoconf/2011-09/msg00004.html>
+ # <http://mail.opensolaris.org/pipermail/ksh93-integration-discuss/2009-February/004121.html>
+ trap : 1 3 2 13 15
+ if test $merge -gt 0; then
exec 2>&1
else
exec 2>&3
fi
"$@"
echo $?
- } | LC_ALL=C ${AM_TAP_AWK-awk} \
+ ) | LC_ALL=C ${AM_TAP_AWK-awk} \
-v me="$me" \
-v test_script_name="$test_name" \
-v log_file="$log_file" \