[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH] Document a bug in GNU Bash with {...} blocks and redirections.
From: |
Benoit Sigoure |
Subject: |
[PATCH] Document a bug in GNU Bash with {...} blocks and redirections. |
Date: |
Fri, 2 Nov 2007 21:57:30 +0100 |
* 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 <address@hidden>
---
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 <address@hidden>
+
+ 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 <address@hidden>
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{.}
address@hidden --------------
@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{!}
address@hidden --------------
@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
address@hidden @address@hidden@}}
address@hidden --------------------
address@hidden @address@hidden@}}
+Some versions of GNU Bash do not properly set @samp{$?} when
+writing the output from a @address@hidden@}} block fails.
+
address@hidden
+$ sh -c '@{ echo foo; @} >/bad; echo $?'
+sh: line 1: /bad: Permission denied
+0
address@hidden example
+
+
@item @command{break}
@c ------------------
@prindex @command{break}
--
1.5.3.4.398.g859b
- [PATCH] Document a bug in GNU Bash with {...} blocks and redirections.,
Benoit Sigoure <=