autoconf-patches
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH] docs: another Solaris sh bug with redirected `:'


From: Stefano Lattarini
Subject: Re: [PATCH] docs: another Solaris sh bug with redirected `:'
Date: Thu, 4 Aug 2011 15:15:39 +0200
User-agent: KMail/1.13.3 (Linux/2.6.30-2-686; KDE/4.4.4; i686; ; )

On Thursday 04 August 2011, Eric Blake wrote:
> 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.
> 
Good idea.  Attached is what I've finally pushed.

BTW, do you happen to know if this ridicolous bug is (or will) be fixed
in the next Solaris version?

Thanks,
  Stefano
From 4b75742acc01e40405b475f32c5db61ca35a9ff7 Mon Sep 17 00:00:00 2001
Message-Id: <address@hidden>
From: Stefano Lattarini <address@hidden>
Date: Thu, 4 Aug 2011 10:24:36 +0200
Subject: [PATCH] docs: another Solaris sh bug with redirected `:'

* 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 |    8 ++++++--
 2 files changed, 13 insertions(+), 2 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index 34c5469..4d850bd 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+2011-08-04  Stefano Lattarini  <address@hidden>
+
+       docs: another Solaris sh bug with redirected `:'
+       * doc/autoconf.texi (File Descriptors): Solaris 10 /bin/sh
+       "optimizes" away redirected `:' commands in a shell function
+       after the first call.
+
 2011-07-31  Paul Eggert  <address@hidden>
 
        docs: modernize treatment of ns-resolution timestamps
diff --git a/doc/autoconf.texi b/doc/autoconf.texi
index b75b408..c6837eb 100644
--- a/doc/autoconf.texi
+++ 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}
+$ @kbd{ls x*}
 x1
+$ @kbd{f () @{ : >$1; @}; f y1; f y2; f y3;}
+$ @kbd{ls y*}
+y1
 @end example
 
 @noindent
-- 
1.7.2.3


reply via email to

[Prev in Thread] Current Thread [Next in Thread]