[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH] docs: another Solaris sh bug with redirected `:'
From: |
Eric Blake |
Subject: |
Re: [PATCH] docs: another Solaris sh bug with redirected `:' |
Date: |
Thu, 04 Aug 2011 06:55:01 -0600 |
User-agent: |
Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2.18) Gecko/20110621 Fedora/3.1.11-1.fc14 Lightning/1.0b3pre Mnenhy/0.8.3 Thunderbird/3.1.11 |
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 address@hidden +1-801-349-2682
Libvirt virtualization library http://libvirt.org