]> git.ipfire.org Git - thirdparty/autoconf.git/commitdiff
Mention Solaris sh ':' redirection bug.
authorRalf Wildenhues <Ralf.Wildenhues@gmx.de>
Sat, 13 Sep 2008 13:17:54 +0000 (15:17 +0200)
committerRalf Wildenhues <Ralf.Wildenhues@gmx.de>
Sat, 13 Sep 2008 13:17:54 +0000 (15:17 +0200)
* doc/autoconf.texi (File Descriptors): Redirecting ':'
in a loop causes bogus optimization with Solaris sh.

Signed-off-by: Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
ChangeLog
doc/autoconf.texi

index 073efdaa6fc9fda9ef3d499104cddb7a5672b61c..cc3d2cba2d51200605928060fb027fb7583e2751 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2008-09-13  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
+
+       Mention Solaris sh ':' redirection bug.
+       * doc/autoconf.texi (File Descriptors): Redirecting ':'
+       in a loop causes bogus optimization with Solaris sh.
+
 2008-09-10  Eric Blake  <ebb9@byu.net>
 
        Avoid testsuite bug when autom4te cache is disabled by user.
index 76bf74665f53809df7ab3dc3f74c96980a651a46..2b1d165cb887bc3dc28fae33d3aee5fbd6d66b02 100644 (file)
@@ -13003,6 +13003,18 @@ In each case the expected result is of course @file{fullness} containing
 @samp{matter} and @file{void} being empty.  However, this bug is
 probably not of practical concern to modern platforms.
 
+Solaris 10 @command{sh} will try to optimize away a @command{:} command
+in a loop after the first iteration, even if it is redirected:
+
+@example
+$ @kbd{for i in 1 2 3 ; do : >x$i; done}
+$ @kbd{ls}
+x1
+@end example
+
+@noindent
+As a workaround, @command{echo} or @command{eval} can be used.
+
 Don't rely on file descriptors 0, 1, and 2 remaining closed in a
 subsidiary program.  If any of these descriptors is closed, the
 operating system may open an unspecified file for the descriptor in the