* Paul Eggert wrote on Wed, Jun 28, 2006 at 07:50:40PM CEST: > This change was prompted by > <http://lists.gnu.org/archive/html/bug-coreutils/2006-06/msg00225.html>, > but I cleaned up some of the HP-UX / OSF/1 discussion while I was in > the neighborhood.
I have scanned Automake and Libtool for instances of this bug, and installed the patch below for Automake to follow the style guideline, even if it won't fix a bug in this case: - Really the issue that the redirection of stdout is mentioned in the shell trace on stderr, does in fact happen with many shells, e.g., ksh, pdksh. - theoretically, the change below could fix a failure of tests/location.test, but: - these shells also typically reset the 'x' flag upon shell function entry. The change is still useful to avoid the bug when code is copied elsewhere, and for consistency. Thus I have applied it. Cheers, Ralf * tests/defs.in (AUTOMAKE_run): Redirect stdout before stderr, for consistency with the recommendation prompted by this report: <http://lists.gnu.org/archive/html/bug-coreutils/2006-06/msg00225.html>. Index: tests/defs.in =================================================================== RCS file: /cvs/automake/automake/tests/defs.in,v retrieving revision 1.38 diff -u -r1.38 defs.in --- tests/defs.in 10 May 2006 21:14:36 -0000 1.38 +++ tests/defs.in 5 Jul 2006 21:44:35 -0000 @@ -331,7 +331,7 @@ expected_exitcode=$1 shift exitcode=0 - $AUTOMAKE ${1+"$@"} 2>stderr >stdout || exitcode=$? + $AUTOMAKE ${1+"$@"} >stdout 2>stderr || exitcode=$? cat stderr cat stdout test $exitcode = $expected_exitcode || exit 1