+2007-11-02 Benoit Sigoure <tsuna@lrde.epita.fr>
+ and Jim Meyering <meyering@redhat.com>
+ and Andreas Schwab <schwab@suse.de>
+ and Eric Blake <ebb9@byu.net>
+
+ Document a bug in GNU Bash with compound commands and redirections.
+ * doc/autoconf.texi (Limitations of Builtins): Mention that GNU
+ Bash doesn't properly set $? when `{ ... } >/bad' fails, and give
+ workaround.
+
2007-11-03 Eric Blake <ebb9@byu.net>
Support m4 1.4.5 in testsuite.
@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
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
if @var{command}; then (exit 1); else :; fi
@end example
+
+@item @command{@{...@}}
+@c --------------------
+@prindex @command{@{...@}}
+As recently as GNU Bash 3.2, some shells do not properly set @samp{$?}
+when failing to write redirected output of any compound command other
+than a subshell group, when that compound command is the first thing
+executed. This is most commonly observed with @{...@}, but also affects
+other compound commands.
+
+@example
+$ @kbd{bash -c '@{ echo foo; @} >/bad; echo $?'}
+bash: line 1: /bad: Permission denied
+0
+$ @kbd{bash -c 'while :; do echo; done >/bad; echo $?'}
+bash: line 1: /bad: Permission denied
+0
+@end example
+
+The workaround is simple: prime bash with a simple command before any
+compound command with redirection.
+
+@example
+$ @kbd{bash -c ':; @{ echo foo; @} >/bad; echo $?'}
+bash: line 1: /bad: Permission denied
+1
+$ @kbd{bash -c ':; while :; do echo; done >/bad; echo $?'}
+bash: line 1: /bad: Permission denied
+1
+@end example
+
+
@item @command{break}
@c ------------------
@prindex @command{break}