From: Ralf Wildenhues Date: Sat, 13 Sep 2008 13:17:54 +0000 (+0200) Subject: Mention Solaris sh ':' redirection bug. X-Git-Tag: v2.63b~295 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=e55f6569675e4cbb4790bff4a545b1813be99cd2;p=thirdparty%2Fautoconf.git Mention Solaris sh ':' redirection bug. * doc/autoconf.texi (File Descriptors): Redirecting ':' in a loop causes bogus optimization with Solaris sh. Signed-off-by: Ralf Wildenhues --- diff --git a/ChangeLog b/ChangeLog index 073efdaa..cc3d2cba 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2008-09-13 Ralf Wildenhues + + 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 Avoid testsuite bug when autom4te cache is disabled by user. diff --git a/doc/autoconf.texi b/doc/autoconf.texi index 76bf7466..2b1d165c 100644 --- a/doc/autoconf.texi +++ b/doc/autoconf.texi @@ -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