]> git.ipfire.org Git - thirdparty/autoconf.git/commitdiff
Update example to match actual Tru64 behavior.
authorEric Blake <ebb9@byu.net>
Wed, 19 Nov 2008 03:07:19 +0000 (20:07 -0700)
committerEric Blake <ebb9@byu.net>
Wed, 19 Nov 2008 03:09:05 +0000 (20:09 -0700)
* doc/autoconf.texi (Limitations of Builtins) <trap>: Correct
the example.
Reported by Ralf Wildenhues.

Signed-off-by: Eric Blake <ebb9@byu.net>
ChangeLog
doc/autoconf.texi

index 1e56b6e9354484bb409cb0317e2066e937173acb..a817ee220bcc6fa6aa688ed72c522423cd8a1e21 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,10 @@
 2008-11-18  Eric Blake  <ebb9@byu.net>
 
+       Update example to match actual Tru64 behavior.
+       * doc/autoconf.texi (Limitations of Builtins) <trap>: 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.
index 71d72f4e75ec95dad34f86434285ee4de7075488..3cc165bb68e3f07ad0371c3fe4e5cd20d41ee122 100644 (file)
@@ -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