From: Eric Blake Date: Wed, 19 Nov 2008 03:07:19 +0000 (-0700) Subject: Update example to match actual Tru64 behavior. X-Git-Tag: v2.63b~95 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=12bb35717bf10ca68f2e40008334ab123dcbe152;p=thirdparty%2Fautoconf.git Update example to match actual Tru64 behavior. * doc/autoconf.texi (Limitations of Builtins) : Correct the example. Reported by Ralf Wildenhues. Signed-off-by: Eric Blake --- diff --git a/ChangeLog b/ChangeLog index 1e56b6e93..a817ee220 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,10 @@ 2008-11-18 Eric Blake + Update example to match actual Tru64 behavior. + * doc/autoconf.texi (Limitations of Builtins) : Correct + the example. + Reported by Ralf Wildenhues. + Add AS_SET_STATUS, make AS_EXIT more efficient. * lib/m4sugar/m4sh.m4 (_AS_EXIT_PREPARE, AS_SET_STATUS): New macros. diff --git a/doc/autoconf.texi b/doc/autoconf.texi index 71d72f4e7..3cc165bb6 100644 --- a/doc/autoconf.texi +++ b/doc/autoconf.texi @@ -15435,14 +15435,14 @@ Another possibility is to warn @acronym{BSD} users not to use @samp{sh -e}. Portable scripts should not use @samp{set -e} if @command{trap} is used to install an exit handler. This is because Tru64/OSF 5.1 @command{sh} -enters the trap handler with the exit status of the command prior to the -one that triggered the errexit handler: +sometimes enters the trap handler with the exit status of the command +prior to the one that triggered the errexit handler: @example -$ @kbd{bash -c 'trap '\''echo $?'\'' 0; set -e; false'} -1 -$ @kbd{sh -c 'trap '\''echo $?'\'' 0; set -e; false'} +$ @kbd{sh -ec 'trap '\''echo $?'\'' 0; false'} 0 +$ @kbd{sh -c 'set -e; trap '\''echo $?'\'' 0; false'} +1 @end example @noindent