From: Peter Rosin Date: Tue, 10 Jan 2012 09:01:29 +0000 (+0100) Subject: tap/awk: avoid redirection issues with bash 3.2 and earlier X-Git-Tag: ng-0.5a~59 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=8525b870d5caa0a04858aa436ad6949ec277fc0c;p=thirdparty%2Fautomake.git tap/awk: avoid redirection issues with bash 3.2 and earlier Fixes automake bug#10465. * lib/tap-driver.sh: Add workaround for bash 3.2 and earlier, which sometimes does not properly set '$?' when failing to write redirected output of a compound command. See the Autoconf manual for more details. The workaround was pointed out by Eric Blake. --- diff --git a/lib/tap-driver.sh b/lib/tap-driver.sh index c0112983b..725e7798b 100755 --- a/lib/tap-driver.sh +++ b/lib/tap-driver.sh @@ -115,7 +115,10 @@ else init_colors='' fi -{ +# :; is there to work around a bug in bash 3.2 (and earlier) which +# does not always set '$?' properly on redirection failure. +# See the Autoconf manual for more details. +:;{ ( # Ignore common signals (in this subshell only!), to avoid potential # problems with Korn shells. Some Korn shells are known to propagate