bug-autoconf
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH] {master} Tests: normalize use of the 'errexit' shell flag.


From: Ralf Wildenhues
Subject: Re: [PATCH] {master} Tests: normalize use of the 'errexit' shell flag.
Date: Sat, 8 Jan 2011 19:38:06 +0100
User-agent: Mutt/1.5.20 (2010-08-04)

[ adding -patches ]

* Eric Blake wrote on Mon, Jan 03, 2011 at 10:22:32PM CET:
> [redirecting to bug-autoconf]
> 
> On 01/03/2011 02:17 PM, Ralf Wildenhues wrote:
> > These two were added by me in fear of shells resetting errexit upon
> > function entry (like some shells do with -x aka xtrace).  Luckily I
> > couldn't find any shells which do this upon testing (by looking for 'e'
> > in the output of)
> >   sh -ec 'f () { echo $-; }; f'
> > 
> > but generally, here's a nice (and more complete than autoconf.texi) list
> > of issues with set -e: http://www.in-ulm.de/~mascheck/various/set-e/
> 
> Awesome reference - the autoconf manual should probably mention it.

Yep.  While at it, I cannot find this link we already have in the
manual:
http://www.opengroup.org/austin/mailarchives/ag-review/msg03507.html
Did it vanish, or is this only viewable with an account or so?

If we can find and correct it; I suggest the first patch below,
otherwise the second.  OK to push?

Thanks,
Ralf

    docs: link to 'set -e' shell behavior overview.
    
    * doc/autoconf.texi (Limitations of Builtins): Add link to
    Sven Mascheck's 'set -e' page.
    Suggestion by Eric Blake.

diff --git a/doc/autoconf.texi b/doc/autoconf.texi
index be1ef5b..ef32295 100644
--- a/doc/autoconf.texi
+++ b/doc/autoconf.texi
@@ -17382,7 +17382,9 @@ Limitations of Builtins
 @cindex @command{set -e}
 The option @option{-e} has historically been underspecified, with enough
 ambiguities to cause numerous differences across various shell
-implementations.  Perhaps the best reference is
+implementations; see for example
address@hidden://www.in-ulm.de/@/~mascheck/@/various/@/set-e/, this overview},
+or
 
@uref{http://www.opengroup.org/@/austin/@/mailarchives/@/ag-review/@/msg03507.html,
 this link}, recommending a change to Posix 2008 to match @command{ksh88}
 behavior.  Note that mixing @code{set -e} and shell functions is asking



    docs: link to 'set -e' shell behavior overview.
    
    * doc/autoconf.texi (Limitations of Builtins): Add link to
    Sven Mascheck's 'set -e' page.  Remove broken Opengroup link.
    Suggestion by Eric Blake.

diff --git a/doc/autoconf.texi b/doc/autoconf.texi
index be1ef5b..b2acabb 100644
--- a/doc/autoconf.texi
+++ b/doc/autoconf.texi
@@ -17382,11 +17382,9 @@ Limitations of Builtins
 @cindex @command{set -e}
 The option @option{-e} has historically been underspecified, with enough
 ambiguities to cause numerous differences across various shell
-implementations.  Perhaps the best reference is
address@hidden://www.opengroup.org/@/austin/@/mailarchives/@/ag-review/@/msg03507.html,
-this link}, recommending a change to Posix 2008 to match @command{ksh88}
-behavior.  Note that mixing @code{set -e} and shell functions is asking
-for surprises:
+implementations; see for example
address@hidden://www.in-ulm.de/@/~mascheck/@/various/@/set-e/, this overview}.
+Note that mixing @code{set -e} and shell functions is asking for surprises:
 
 @example
 set -e



reply via email to

[Prev in Thread] Current Thread [Next in Thread]