From 74f93059738c647d8330814d67829315385704fa Mon Sep 17 00:00:00 2001 From: Eric Blake Date: Tue, 18 Nov 2008 06:30:37 -0700 Subject: [PATCH] Document a Solaris /bin/sh bug with 'set -e'. * doc/autoconf.texi (Shell Functions): Mention the bug. Signed-off-by: Eric Blake --- ChangeLog | 5 +++++ doc/autoconf.texi | 9 +++++++++ 2 files changed, 14 insertions(+) diff --git a/ChangeLog b/ChangeLog index 41f97d338..93c085c77 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2008-11-18 Eric Blake + + Document a Solaris /bin/sh bug with 'set -e'. + * doc/autoconf.texi (Shell Functions): Mention the bug. + 2008-11-17 Eric Blake Detect empty list in AS_FOR. diff --git a/doc/autoconf.texi b/doc/autoconf.texi index 07db25410..90e6ceee2 100644 --- a/doc/autoconf.texi +++ b/doc/autoconf.texi @@ -14660,6 +14660,15 @@ $ @kbd{ash -c 'foo()@{ echo $?; @}; trap foo 0; (exit 2); exit 2'; echo $?} 2 @end example +Not all shells treat shell functions as simple commands impacted by +@samp{set -e}, for example with Solaris 10 @command{bin/sh}: + +@example +$ @kbd{bash -c 'f()@{ return 1; @}; set -e; f; echo oops} +$ @kbd{/bin/sh -c 'f()@{ return 1; @}; set -e; f; echo oops} +oops +@end example + Shell variables and functions may share the same namespace, for example with Solaris 10 @command{/bin/sh}: -- 2.47.3