From: Ralf Wildenhues Date: Mon, 15 Oct 2007 21:15:39 +0000 (+0200) Subject: * doc/autoconf.texi (Portable Shell): Improve description of zsh X-Git-Tag: v2.62~212^2~4 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=a7f9fc63e8b25c7b3f8b1d4b7ac3d61ba4df3552;p=thirdparty%2Fautoconf.git * doc/autoconf.texi (Portable Shell): Improve description of zsh 4.x function subshell bug with exit and trap. --- diff --git a/ChangeLog b/ChangeLog index c6654850..6038abb0 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2007-10-15 Ralf Wildenhues + + * doc/autoconf.texi (Portable Shell): Improve description of zsh + 4.x function subshell bug with exit and trap. + 2007-10-15 Eric Blake Enhance AS_HELP_STRING. diff --git a/doc/autoconf.texi b/doc/autoconf.texi index addb7b1a..ded0f672 100644 --- a/doc/autoconf.texi +++ b/doc/autoconf.texi @@ -11976,15 +11976,13 @@ that are not found in all Bourne-compatible shells; restrict yourself to the lowest common denominator. Even @code{unset} is not supported by all shells! -Shell functions are considered portable nowadays, though Autoconf -still does not use them (Autotest does). However, inside a shell -function you should not be using @code{$?} to check the return code -of a subshell invocation; in general, since the caller of a shell -function might look at the function's return code, make sure that the -last statement of a shell function does not invoke a subshell. -Using subshells triggers bugs in zsh 4.x; while Autoconf tries -to find a shell that does not exhibit the bug, zsh might be the -only shell present on the user's machine. +Shell functions are considered portable nowadays, though Autoconf still +does not use them (Autotest does). However, inside a shell function, +you should not rely on the error status of a subshell if the last +command of that subshell was @code{exit} or @code{trap}, as this +triggers bugs in zsh 4.x; while Autoconf tries to find a shell that +does not exhibit the bug, zsh might be the only shell present on the +user's machine. Some ancient systems have quite small limits on the length of the @samp{#!} line; for instance, 32