On 08/04/2011 02:25 AM, Stefano Lattarini wrote:
* doc/autoconf.texi (File Descriptors): Solaris 10 /bin/sh
"optimizes" away redirected `:' commands in a shell function
after the first call.
---
  ChangeLog         |    7 +++++++
  doc/autoconf.texi |    6 +++++-
  2 files changed, 12 insertions(+), 1 deletions(-)


+++ b/doc/autoconf.texi
@@ -15428,12 +15428,16 @@ In each case the expected result is of course 
@file{fullness} containing
  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:
+(even if it is redirected) in a loop after the first iteration, or in a
+shell function after the first call:

  @example
  $ @kbd{for i in 1 2 3 ; do :>x$i; done}
  $ @kbd{ls}

How about making this {ls x*}

  x1
+$ @kbd{f () @{ :>$1; @}; f y1; f y2; f y3;}
+$ @kbd{ls}

and {ls y*}

+y1
  @end example

so that the two examples can reasonably be tested in the same directory? ACK with that nit fixed.

--
Eric Blake   [email protected]    +1-801-349-2682
Libvirt virtualization library http://libvirt.org

Reply via email to