[PATCH] Document a bug in GNU Bash with {...} blocks and redirections.

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

 



	* doc/autoconf.texi (Limitations of Builtins): Mention that GNU Bash
	doesn't properly set $? when `{ ... } >/bad' fails.
	(Use re-wording from Jim Meyering)

Signed-off-by: Benoit Sigoure <tsuna@xxxxxxxxxxxxx>
---
 ChangeLog         |    7 +++++++
 doc/autoconf.texi |   15 +++++++++++++++
 2 files changed, 22 insertions(+), 0 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index 1407834..6c4f1b2 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+2007-11-02  Benoit Sigoure  <tsuna@xxxxxxxxxxxxx>
+
+	Document a bug in GNU Bash with {...} blocks and redirections.
+	* doc/autoconf.texi (Limitations of Builtins): Mention that GNU Bash
+	doesn't properly set $? when `{ ... } >/bad' fails.
+	(Use re-wording from Jim Meyering)
+
 2007-10-31  Benoit Sigoure  <tsuna@xxxxxxxxxxxxx>
 
 	Explain how to define $(AUTOM4TE) to generate `testsuite'.
diff --git a/doc/autoconf.texi b/doc/autoconf.texi
index 5d2b564..1b54739 100644
--- a/doc/autoconf.texi
+++ b/doc/autoconf.texi
@@ -13494,6 +13494,7 @@ the @samp{x} into account later in the pipe.
 
 @table @asis
 @item @command{.}
+@c --------------
 @prindex @command{.}
 Use @command{.} only with regular files (use @samp{test -f}).  Bash
 2.03, for instance, chokes on @samp{. /dev/null}.  Also, remember that
@@ -13502,6 +13503,7 @@ you want to use @command{.} on a file @file{foo} in the current
 directory, you must use @samp{. ./foo}.
 
 @item @command{!}
+@c --------------
 @prindex @command{!}
 The Unix version 7 shell did not support
 negating the exit status of commands with @command{!}, and this feature
@@ -13528,6 +13530,19 @@ More generally, one can always rewrite @samp{! @var{command}} as:
 if @var{command}; then (exit 1); else :; fi
 @end example
 
+@item @command{@{...@}}
+@c --------------------
+@prindex @command{@{...@}}
+Some versions of GNU Bash do not properly set @samp{$?} when
+writing the output from a @command{@{...@}} block fails.
+
+@example
+$ sh -c '@{ echo foo; @} >/bad; echo $?'
+sh: line 1: /bad: Permission denied
+0
+@end example
+
+
 @item @command{break}
 @c ------------------
 @prindex @command{break}
-- 
1.5.3.4.398.g859b



_______________________________________________
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