autoconf
[Top][All Lists]
Advanced

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

Shell portability documentation in autoconf manual


From: jens . schmidt35
Subject: Shell portability documentation in autoconf manual
Date: Wed, 29 Apr 2009 13:29:36 +0200 (CEST)

Hi.

I am referring to the autoconf manual that I found on savannah.org under path 
/autoconf/manual/autoconf-2.63.

Some more issues, continuing the list I started in my previous mail:

Issue 3:
---------

Another reason to be careful with "set -e" on Solaris 10: A failing command 
substitution may not be caught by any means if option "-e" is set. The shell 
bails out immediately:

  $ ( set -e; foo=`false` || echo "foo"; echo "bar" ); echo "baz"
  baz

Issue 4:
---------

Older Bashes (mine is 2.05b.0(1)) may forget exit values if there is a trap on 
exit set and if the trap consists of one succeeding external command only.  
Seems to be fixed in latest Bashes.

  $ /bin/bash -c 'trap "/bin/true" 0; exit 2'; echo $?
  0
  $ /bin/bash -c 'trap ":; /bin/true" 0; exit 2'; echo $?
  2

I hit that problem when I had a "rm -f " clean-up trap in a canned sequence in 
a makefile, where the sequence failed but "make" did not take any notice of 
that fact due to this bug ... not too exotic an use-case, I think.

Regards

Jens

Arcor.de Gaming Area - kostenfrei daddeln bis der Arzt kommt!
Jetzt checken und aus über 80 Spielen wählen!
http://www.arcor.de/footer-gaming/




reply via email to

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