Shell portability documentation in autoconf manual

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

 



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/


_______________________________________________
Autoconf mailing list
Autoconf@xxxxxxx
http://lists.gnu.org/mailman/listinfo/autoconf


[Index of Archives]     [GCC Help]     [Kernel Discussion]     [RPM Discussion]     [Red Hat Development]     [Yosemite News]     [Linux USB]     [Samba]

  Powered by Linux