<?xml version="1.0" encoding="UTF-8"?>
<rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns="http://purl.org/rss/1.0/" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:syn="http://purl.org/rss/1.0/modules/syndication/" xmlns:admin="http://webns.net/mvcb/">
  <channel rdf:about="http://blog.gmane.org/gmane.comp.shells.dash">
    <title>gmane.comp.shells.dash</title>
    <link>http://blog.gmane.org/gmane.comp.shells.dash</link>
    <description/>
    <syn:updatePeriod>hourly</syn:updatePeriod>
    <syn:updateFrequency>1</syn:updateFrequency>
    <syn:updateBase>1901-01-01T00:00+00:00</syn:updateBase>
    <items>
      <rdf:Seq>
        <rdf:li rdf:resource="http://permalink.gmane.org/gmane.comp.shells.dash/733"/>
        <rdf:li rdf:resource="http://permalink.gmane.org/gmane.comp.shells.dash/732"/>
        <rdf:li rdf:resource="http://permalink.gmane.org/gmane.comp.shells.dash/731"/>
        <rdf:li rdf:resource="http://permalink.gmane.org/gmane.comp.shells.dash/730"/>
        <rdf:li rdf:resource="http://permalink.gmane.org/gmane.comp.shells.dash/729"/>
        <rdf:li rdf:resource="http://permalink.gmane.org/gmane.comp.shells.dash/728"/>
        <rdf:li rdf:resource="http://permalink.gmane.org/gmane.comp.shells.dash/727"/>
        <rdf:li rdf:resource="http://permalink.gmane.org/gmane.comp.shells.dash/726"/>
        <rdf:li rdf:resource="http://permalink.gmane.org/gmane.comp.shells.dash/725"/>
        <rdf:li rdf:resource="http://permalink.gmane.org/gmane.comp.shells.dash/724"/>
        <rdf:li rdf:resource="http://permalink.gmane.org/gmane.comp.shells.dash/723"/>
        <rdf:li rdf:resource="http://permalink.gmane.org/gmane.comp.shells.dash/722"/>
        <rdf:li rdf:resource="http://permalink.gmane.org/gmane.comp.shells.dash/721"/>
        <rdf:li rdf:resource="http://permalink.gmane.org/gmane.comp.shells.dash/720"/>
        <rdf:li rdf:resource="http://permalink.gmane.org/gmane.comp.shells.dash/719"/>
        <rdf:li rdf:resource="http://permalink.gmane.org/gmane.comp.shells.dash/718"/>
        <rdf:li rdf:resource="http://permalink.gmane.org/gmane.comp.shells.dash/717"/>
        <rdf:li rdf:resource="http://permalink.gmane.org/gmane.comp.shells.dash/716"/>
        <rdf:li rdf:resource="http://permalink.gmane.org/gmane.comp.shells.dash/715"/>
        <rdf:li rdf:resource="http://permalink.gmane.org/gmane.comp.shells.dash/714"/>
      </rdf:Seq>
    </items>
    <image rdf:resource="http://gmane.org/img/gmane-25t.png"/>
    <textinput rdf:resource=""/>
  </channel>
  <image rdf:about="http://gmane.org/img/gmane-25t.png">
    <title>Gmane</title>
    <url>http://gmane.org/img/gmane-25t.png</url>
    <link>http://gmane.org</link>
  </image>
  <item rdf:about="http://permalink.gmane.org/gmane.comp.shells.dash/733">
    <title>candidatul fara studii</title>
    <link>http://permalink.gmane.org/gmane.comp.shells.dash/733</link>
    <description>&lt;pre&gt;
http://www.altphel.ro/2012/05/dobre-arata-ne-diploma/
 To unsubscribe please send email to unsubscribe&amp;lt; at &amp;gt;cc.psd-prahova.ro
--
To unsubscribe from this list: send the line "unsubscribe dash" in
the body of a message to majordomo&amp;lt; at &amp;gt;vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

&lt;/pre&gt;</description>
    <dc:creator>cramer&lt; at &gt;cc.psd-prahova.ro</dc:creator>
    <dc:date>2012-05-24T12:37:09</dc:date>
  </item>
  <item rdf:about="http://permalink.gmane.org/gmane.comp.shells.dash/732">
    <title>candidatul fara studii</title>
    <link>http://permalink.gmane.org/gmane.comp.shells.dash/732</link>
    <description>&lt;pre&gt;
http://www.altphel.ro/2012/05/dobre-arata-ne-diploma/
 To unsubscribe please send email to unsubscribe&amp;lt; at &amp;gt;cc.psd-prahova.ro
--
To unsubscribe from this list: send the line "unsubscribe dash" in
the body of a message to majordomo&amp;lt; at &amp;gt;vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

&lt;/pre&gt;</description>
    <dc:creator>cramer&lt; at &gt;cc.psd-prahova.ro</dc:creator>
    <dc:date>2012-05-24T11:23:59</dc:date>
  </item>
  <item rdf:about="http://permalink.gmane.org/gmane.comp.shells.dash/731">
    <title>[PATCH] avoid overflow for very long variable name</title>
    <link>http://permalink.gmane.org/gmane.comp.shells.dash/731</link>
    <description>&lt;pre&gt;
Otherwise, this:
  $ perl -le 'print "v"x(2**31+1) ."=1"' | dash
provokes integer overflow:

  (gdb) bt
  #0  doformat (dest=0x61d580, f=0x416a08 "%s: %d: %s: ", ap=0x7fffffffd308)
      at output.c:310
  #1  0x00000000004128c1 in outfmt (file=0x61d580, fmt=0x416a08 "%s: %d: %s: ")
      at output.c:257
  #2  0x000000000040382e in exvwarning2 (msg=0x417339 "Out of space",
      ap=0x7fffffffd468) at error.c:125
  #3  0x000000000040387e in exverror (cond=1, msg=0x417339 "Out of space",
      ap=0x7fffffffd468) at error.c:156
  #4  0x0000000000403938 in sh_error (msg=0x417339 "Out of space") at error.c:172
  #5  0x000000000040c970 in ckmalloc (nbytes=18446744071562067984)
      at memalloc.c:57
  #6  0x000000000040ca78 in stalloc (nbytes=18446744071562067972)
      at memalloc.c:132
  #7  0x000000000040ece9 in grabstackblock (len=18446744071562067972)
      at memalloc.h:67
  #8  0x00000000004106b5 in readtoken1 (firstc=118, syntax=0x419522 "",
      eofmark=0x0, striptabs=0) at parser.c:1040
  #9  0x00000000004101a4 in xxreadtoken () at parser.c:826
  #10 0x000000000040fe1d in readtoken () at parser.c:697
  #11 0x000000000040edcc in parsecmd (interact=0) at parser.c:145
  #12 0x000000000040c679 in cmdloop (top=1) at main.c:224
  #13 0x000000000040c603 in main (argc=2, argv=0x7fffffffd9f8) at main.c:178

  #8  0x00000000004106b5 in readtoken1 (firstc=118, syntax=0x419522 "",
      eofmark=0x0, striptabs=0) at parser.c:1040
  1040    grabstackblock(len);
  (gdb) p len
  $30 = -2147483644

Signed-off-by: Jim Meyering &amp;lt;meyering&amp;lt; at &amp;gt;redhat.com&amp;gt;
---
 ChangeLog    | 5 +++++
 src/parser.c | 2 +-
 2 files changed, 6 insertions(+), 1 deletion(-)

diff --git a/ChangeLog b/ChangeLog
index 8686332..c84aa7e 100644
--- a/ChangeLog
+++ b/ChangeLog
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -1,3 +1,8 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt;
+2012-03-11  Jim Meyering  &amp;lt;meyering&amp;lt; at &amp;gt;redhat.com&amp;gt;
+
+* Avoid overflow for very long variable name.
+$ perl -le 'print "v"x(2**31+1) ."=1"' | dash
+
 2012-02-25  Herbert Xu &amp;lt;herbert&amp;lt; at &amp;gt;gondor.apana.org.au&amp;gt;

 * Sanitise environment variable names on entry.
diff --git a/src/parser.c b/src/parser.c
index 6de2762..572cbcd 100644
--- a/src/parser.c
+++ b/src/parser.c
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -853,7 +853,7 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt; readtoken1(int firstc, char const *syntax, char *eofmark, int striptabs)
 {
 int c = firstc;
 char *out;
-int len;
+size_t len;
 struct nodelist *bqlist;
 int quotef;
 int dblquote;
--
1.7.10.2.552.gaa3bb87
--
To unsubscribe from this list: send the line "unsubscribe dash" in
the body of a message to majordomo&amp;lt; at &amp;gt;vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

&lt;/pre&gt;</description>
    <dc:creator>Jim Meyering</dc:creator>
    <dc:date>2012-05-23T20:37:48</dc:date>
  </item>
  <item rdf:about="http://permalink.gmane.org/gmane.comp.shells.dash/730">
    <title>Re: wait and ctrl+Z</title>
    <link>http://permalink.gmane.org/gmane.comp.shells.dash/730</link>
    <description>&lt;pre&gt;








This is not actually said in the XCU 'wait' page but in XCU 2.11 Signals
and Error Handling.

However, it says something subtly different: only a signal for which a
trap has been set should cause 'wait' to return immediately with an exit
status greater than 128.

Because no trap has been set on SIGTSTP, 'wait' should not be
interrupted here and the shell should continue waiting.

Likewise, if the shell internally uses SIGCHLD to get notified about
process termination, this does not interrupt 'wait'; dash implements
that aspect properly.


Only if you have set any traps that resume execution of the original
script (i.e. do not exit the process).

Otherwise, if 'wait' is being called without parameters, you can do
something like
  until wait; do :; done

If 'wait' is being called with parameters, the required loop is very
complicated.

&lt;/pre&gt;</description>
    <dc:creator>Jilles Tjoelker</dc:creator>
    <dc:date>2012-05-03T22:46:38</dc:date>
  </item>
  <item rdf:about="http://permalink.gmane.org/gmane.comp.shells.dash/729">
    <title>Re: wait and ctrl+Z</title>
    <link>http://permalink.gmane.org/gmane.comp.shells.dash/729</link>
    <description>&lt;pre&gt;

Hello, and thanks for you answer.

I find that quite surprising. I re-read the posix description of wait, and 
my understanding is that the return value of wait should depend on what 
happened to the waited process (exit code, signal), not to wait itself. 
And other shells seem to agree.

Are you suggesting that wait should always be used in a loop? With what 
check exactly?


&lt;/pre&gt;</description>
    <dc:creator>Marc Glisse</dc:creator>
    <dc:date>2012-05-03T22:28:17</dc:date>
  </item>
  <item rdf:about="http://permalink.gmane.org/gmane.comp.shells.dash/728">
    <title>Re: wait and ctrl+Z</title>
    <link>http://permalink.gmane.org/gmane.comp.shells.dash/728</link>
    <description>&lt;pre&gt;
That's normal as wait was interrupted by a signal.  If you want
to wait even after an interruption, you should check the return
value of wait.

Cheers,
&lt;/pre&gt;</description>
    <dc:creator>Herbert Xu</dc:creator>
    <dc:date>2012-05-03T21:51:22</dc:date>
  </item>
  <item rdf:about="http://permalink.gmane.org/gmane.comp.shells.dash/727">
    <title>Spital nou de pediatrie</title>
    <link>http://permalink.gmane.org/gmane.comp.shells.dash/727</link>
    <description>&lt;pre&gt;
http://www.youtube.com/watch?feature=player_embedded&amp;amp;v=phjGxHn3uKU
 To unsubscribe please send email to unsubscribe&amp;lt; at &amp;gt;cc.psd-prahova.ro
--
To unsubscribe from this list: send the line "unsubscribe dash" in
the body of a message to majordomo&amp;lt; at &amp;gt;vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

&lt;/pre&gt;</description>
    <dc:creator>cramer&lt; at &gt;cc.psd-prahova.ro</dc:creator>
    <dc:date>2012-05-02T13:14:47</dc:date>
  </item>
  <item rdf:about="http://permalink.gmane.org/gmane.comp.shells.dash/726">
    <title>- Important Email</title>
    <link>http://permalink.gmane.org/gmane.comp.shells.dash/726</link>
    <description>&lt;pre&gt;Good Morning,

we are currently generating top quality leads &amp;amp; data
for several clients.

if you are in market looking for quality leads or data, this is some
thing you do not want to miss.
drop me a line &amp;amp; I will forward you our pricing and volumes.

let's jump on quick call &amp;amp; I'll show you how to take your business to
next level &amp;amp; lower your customer acquisition costs w no cheesy sales
tactics.

best,
-Mark
--
To unsubscribe from this list: send the line "unsubscribe dash" in
the body of a message to majordomo&amp;lt; at &amp;gt;vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

&lt;/pre&gt;</description>
    <dc:creator>mark payneec</dc:creator>
    <dc:date>2012-04-30T19:41:23</dc:date>
  </item>
  <item rdf:about="http://permalink.gmane.org/gmane.comp.shells.dash/725">
    <title>Re: [BUG] dash doesn't report syntax error when it should on stray "fi"</title>
    <link>http://permalink.gmane.org/gmane.comp.shells.dash/725</link>
    <description>&lt;pre&gt;



In what way does a lone "fi" differ from constructions like the below,
which do not match the POSIX grammar but are accepted by some subset of
shells that attempt to comply to POSIX:

case x in (esac) ;; esac

for i; do echo "$i"; done

for i;
do echo "$i"; done

for i { echo "$i"; }

for ((i = 0; i &amp;lt; 10; i += 1)) do echo "$i"; done

f() :

The only difference seems to be that the lone "fi" is somehow "wrong"
while the above are not "wrong". That's too vague for a specification.

Unfortunately, the XCU volume is very thin on constraints (as found, for
example, in the C standard). Many ways to do things "wrong" are instead
left open for implementation extensions. In practice, many such
extensions exist.

That said, rejecting the lone "fi" is still a quality of implementation
issue, particularly because dash's current behaviour is poorly defined.
I fixed it in FreeBSD a while ago (9.0 has the fix).

In making this change, a testsuite is very useful to guard against bugs
and to ensure no cases are missed, but latent bugs in shell scripts may
still cause annoyance. If there is an error in a command substitution
that is normally not executed, most shells (except ash derivatives) will
not notice this.

For example, FreeBSD 9.0's sh is one of the few shells that detects the
error in:

if false; then `fi`; fi

&lt;/pre&gt;</description>
    <dc:creator>Jilles Tjoelker</dc:creator>
    <dc:date>2012-04-24T22:47:03</dc:date>
  </item>
  <item rdf:about="http://permalink.gmane.org/gmane.comp.shells.dash/724">
    <title>Re: [BUG] dash doesn't report syntax error when it should on stray "fi"</title>
    <link>http://permalink.gmane.org/gmane.comp.shells.dash/724</link>
    <description>&lt;pre&gt;

Yes, I think you're right.

For some reason I thought that using reserved words in ways not
permitted by the grammar produced undefined behavior, to support
shells with extensions like the arithmetic "for".  But now that I read
more closely, it looks like "function", "[[", "]]", and "select"
produce unspecified behavior but everything else is pretty well
specified.  Thanks for clarifying.
--
To unsubscribe from this list: send the line "unsubscribe dash" in
the body of a message to majordomo&amp;lt; at &amp;gt;vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

&lt;/pre&gt;</description>
    <dc:creator>Jonathan Nieder</dc:creator>
    <dc:date>2012-04-23T19:54:58</dc:date>
  </item>
  <item rdf:about="http://permalink.gmane.org/gmane.comp.shells.dash/723">
    <title>Re: [BUG] dash doesn't report syntax error when it should on stray "fi"</title>
    <link>http://permalink.gmane.org/gmane.comp.shells.dash/723</link>
    <description>&lt;pre&gt;Hi Jonathan, Chet.

On 04/23/2012 09:44 PM, Jonathan Nieder wrote:
I have no patch, but a little more information that might help anyone who
volunteers to write one:

  $ nl=$'\n'

  $ dash -c ":$nl fi" &amp;amp;&amp;amp; echo NOERR
  dash: Syntax error: "fi" unexpected

  $ dash -c ":;$nl fi" &amp;amp;&amp;amp; echo NOERR
  dash: Syntax error: "fi" unexpected

  $ dash -c ":&amp;amp;$nl fi" &amp;amp;&amp;amp; echo NOERR
  dash: Syntax error: "fi" unexpected

  $ dash -c ": &amp;amp;&amp;amp; fi" &amp;amp;&amp;amp; echo NOERR
  dash: Syntax error: "fi" unexpected

The problem seems to only be present when a stray "fi" comes after a
'&amp;amp;' or ';' -- see:

  $ dash -c ":; fi" &amp;amp;&amp;amp; echo NOERR
  NOERR

  dash -c ":&amp;amp; fi" &amp;amp;&amp;amp; echo NOERR
  NOERR


The same goes for other loops/conditionals terminators:

  $ dash -c ":; done" &amp;amp;&amp;amp; echo NOERR
  NOERR

  $ dash -c ":; esac" &amp;amp;&amp;amp; echo NOERR
  NOERR

  $ dash -c ":&amp;amp; elif" &amp;amp;&amp;amp; echo NOERR
  NOERR

HTH,
  Stefano
--
To unsubscribe from this list: send the line "unsubscribe dash" in
the body of a message to majordomo&amp;lt; at &amp;gt;vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

&lt;/pre&gt;</description>
    <dc:creator>Stefano Lattarini</dc:creator>
    <dc:date>2012-04-23T19:53:21</dc:date>
  </item>
  <item rdf:about="http://permalink.gmane.org/gmane.comp.shells.dash/722">
    <title>Re: [BUG] dash doesn't report syntax error when it should on stray "fi"</title>
    <link>http://permalink.gmane.org/gmane.comp.shells.dash/722</link>
    <description>&lt;pre&gt;
The way I read 2.10.2, Posix requires that the "fi" resolve to the
reserved word `fi' in this case, since it's in a position where a
command name is expected (Rule 1, [Command Name]).  I would think that
would make it a syntax error in any application, conforming or not.

Chet
&lt;/pre&gt;</description>
    <dc:creator>Chet Ramey</dc:creator>
    <dc:date>2012-04-23T19:48:08</dc:date>
  </item>
  <item rdf:about="http://permalink.gmane.org/gmane.comp.shells.dash/721">
    <title>Re: [BUG] dash doesn't report syntax error when it should on stray "fi"</title>
    <link>http://permalink.gmane.org/gmane.comp.shells.dash/721</link>
    <description>&lt;pre&gt;

I meant "conforming POSIX applications".

A patch for this might even be welcome if it makes dash bigger, if
that's what you're wondering.
--
To unsubscribe from this list: send the line "unsubscribe dash" in
the body of a message to majordomo&amp;lt; at &amp;gt;vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

&lt;/pre&gt;</description>
    <dc:creator>Jonathan Nieder</dc:creator>
    <dc:date>2012-04-23T19:44:53</dc:date>
  </item>
  <item rdf:about="http://permalink.gmane.org/gmane.comp.shells.dash/720">
    <title>Re: [BUG] dash doesn't report syntax error when it should on stray "fi"</title>
    <link>http://permalink.gmane.org/gmane.comp.shells.dash/720</link>
    <description>&lt;pre&gt;
What are `conforming scripts'?  Scripts without syntax errors?

&lt;/pre&gt;</description>
    <dc:creator>Chet Ramey</dc:creator>
    <dc:date>2012-04-23T19:27:33</dc:date>
  </item>
  <item rdf:about="http://permalink.gmane.org/gmane.comp.shells.dash/719">
    <title>Re: [BUG] dash doesn't report syntax error when it should on stray "fi"</title>
    <link>http://permalink.gmane.org/gmane.comp.shells.dash/719</link>
    <description>&lt;pre&gt;Hi Jonathan, thanks for the quick reply.

On 04/23/2012 07:03 PM, Jonathan Nieder wrote:
True, it it makes "dash -n" less useful (not that I deeply care, just pointing
it out).


Thanks,
  Stefano
--
To unsubscribe from this list: send the line "unsubscribe dash" in
the body of a message to majordomo&amp;lt; at &amp;gt;vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

&lt;/pre&gt;</description>
    <dc:creator>Stefano Lattarini</dc:creator>
    <dc:date>2012-04-23T17:09:40</dc:date>
  </item>
  <item rdf:about="http://permalink.gmane.org/gmane.comp.shells.dash/718">
    <title>Re: [BUG] dash doesn't report syntax error when it should on stray "fi"</title>
    <link>http://permalink.gmane.org/gmane.comp.shells.dash/718</link>
    <description>&lt;pre&gt;Hi Stefano,

Stefano Lattarini wrote:


Since this doesn't affect conforming scripts, I suspect it falls
squarely within the "patches welcome as long as they don't make dash
bigger" category.

Thanks for finding it.

Sincerely,
Jonathan
--
To unsubscribe from this list: send the line "unsubscribe dash" in
the body of a message to majordomo&amp;lt; at &amp;gt;vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

&lt;/pre&gt;</description>
    <dc:creator>Jonathan Nieder</dc:creator>
    <dc:date>2012-04-23T17:03:39</dc:date>
  </item>
  <item rdf:about="http://permalink.gmane.org/gmane.comp.shells.dash/717">
    <title>[BUG] dash doesn't report syntax error when it should on stray "fi"</title>
    <link>http://permalink.gmane.org/gmane.comp.shells.dash/717</link>
    <description>&lt;pre&gt;How to reproduce:

  $ dash -c ':; fi'; echo stat = $?
  stat = 0

Behaviour of other shells:

  $ bash-4.1 -c ':; fi'; echo stat = $?  # Bash 4.1.5
  bash-4.1: -c: line 0: syntax error near unexpected token `fi'
  bash-4.1: -c: line 0: `:; fi'
  stat = 1

  $ bash-3.2 -c ':; fi'; echo stat = $? # Bash 3.2.0
  bash-3.2: -c: line 0: syntax error near unexpected token `fi'
  bash-3.2: -c: line 0: `:; fi'
  stat = 2

  $ ksh -c ':; fi'; echo stat = $? # AT&amp;amp;T Ksh
  ksh: syntax error at line 1: `fi' unexpected
  stat = 3

  $ pdksh -c ':; fi'; echo stat = $? # Public Domain Ksh, version 5.2.14
  pdksh: syntax error: `fi' unexpected
  stat = 1

  $ zsh -c ':; fi'; echo stat = $?  # Zsh 4.3.12
  zsh:1: parse error near `fi'
  stat = 1


Version information:

  $ dpkg -l dash
  ii   dash   0.5.5.1-7.4   POSIX-compliant shell

Regards,
  Stefano
--
To unsubscribe from this list: send the line "unsubscribe dash" in
the body of a message to majordomo&amp;lt; at &amp;gt;vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

&lt;/pre&gt;</description>
    <dc:creator>Stefano Lattarini</dc:creator>
    <dc:date>2012-04-23T16:53:27</dc:date>
  </item>
  <item rdf:about="http://permalink.gmane.org/gmane.comp.shells.dash/716">
    <title>wait and ctrl+Z</title>
    <link>http://permalink.gmane.org/gmane.comp.shells.dash/716</link>
    <description>&lt;pre&gt;Hello,

I noticed a strange behavior of "wait" when I suspend and resume a script.

$ cat a.sh
#!/bin/dash
(sleep 7; echo blah) &amp;amp;
(sleep 7; echo bloh) &amp;amp;
wait ; echo coucou
$ ./a.sh
^Z
zsh: suspended  ./a.sh
$ fg
[1]  + continued  ./a.sh
coucou
$ blah
bloh

As you can see, the instruction after "wait" was executed immediatly on 
resume, without waiting for the jobs.

If I replace the ';' after "wait" by "&amp;amp;&amp;amp;" and do the same suspend+resume, 
"coucou" is never printed.

I am using dash version 0.5.7-3 in debian testing.

&lt;/pre&gt;</description>
    <dc:creator>Marc Glisse</dc:creator>
    <dc:date>2012-04-20T11:31:39</dc:date>
  </item>
  <item rdf:about="http://permalink.gmane.org/gmane.comp.shells.dash/715">
    <title>Re: local var=$(cat) only reads one line</title>
    <link>http://permalink.gmane.org/gmane.comp.shells.dash/715</link>
    <description>&lt;pre&gt;Hi Jilles, thanks for your reply. Indeed now I remember having read
somewhere that you couldn't portably rely on assignments after "local"
to suppress word expansion in the same way that ordinary assignments do.
I had forgotten that. I hope shell implementations evolve towards more
consistency about this. In the meantime, it's easy enough to get
portable behavior if you remember the issue.

On another note, I was reading in this mailing list about dash's
treatment of:
    FOO=value shell_function $args
    printf "%s\n" "$FOO" # prints 'value'

The other discussion points out that this surprising behavior is in fact
mandated by POSIX.

I notice however in the dash.1 manpage distributed with finnix 103, the
following:

     When a shell function is executed, all of the shell positional
     parameters
     (except $0, which remains unchanged) are set to the arguments of
     the
     shell function.  The variables which are explicitly placed in the
     envi-
     ronment of the command (by placing assignments to them before the
     func-
     tion name) ***are made local to the function and are set to the
     values
     given.***  Then the command given in the function definition is
     executed.
     The positional parameters are restored to their original values
     when the
     command completes.  This all occurs within the current shell.

Presumably this manpage should be updated to track the current behavior
of dash. I'm not sure whether it comes from the dash source distro, or
was added in by the finnix maintainers.

&lt;/pre&gt;</description>
    <dc:creator>Jim Pryor</dc:creator>
    <dc:date>2012-04-09T16:23:00</dc:date>
  </item>
  <item rdf:about="http://permalink.gmane.org/gmane.comp.shells.dash/714">
    <title>Re: local var=$(cat) only reads one line</title>
    <link>http://permalink.gmane.org/gmane.comp.shells.dash/714</link>
    <description>&lt;pre&gt;






The cause is that the local command expands to
  local IN=abc def ghi
and therefore it sets IN to less than what you expect and also makes two
more variables local.

Now, local is not in POSIX, but export and readonly are and have exactly
the same issue.

Reading POSIX.1-2008 (and also older versions) literally, this way of
splitting is correct. However, ksh93, bash and pdksh think differently,
doing what your script expects. Also, the examples section of export has
  export PATH=/local/bin:$PATH
which assumes that either the value will not contain IFS characters or
metacharacters or it will not be split regardless.

Dash had this behaviour for some time but it was dropped again because
of inconsistencies between implementations.

However, there appears to be some sort of agreement on how it should
work now:
http://austingroupbugs.net/view.php?id=351
(scroll down to note 0000943).

&lt;/pre&gt;</description>
    <dc:creator>Jilles Tjoelker</dc:creator>
    <dc:date>2012-04-09T15:34:24</dc:date>
  </item>
  <item rdf:about="http://permalink.gmane.org/gmane.comp.shells.dash/713">
    <title>Re: local var=$(cat) only reads one line</title>
    <link>http://permalink.gmane.org/gmane.comp.shells.dash/713</link>
    <description>&lt;pre&gt;
test4 was supposed to use quotes: "$(cat)". It works fine either way.
This also works fine:

test1a() {
    local IN
    IN=$(cat)
    printf "test1a &amp;lt;%s&amp;gt;\n" "$IN"
}

It's only this which fails:

test1a() {
    local IN=$(cat)
    printf "test1 &amp;lt;%s&amp;gt;\n" "$IN"
}

I've also reported to FreeBSD:
&amp;lt;http://www.freebsd.org/cgi/query-pr.cgi?pr=166771&amp;gt;
&lt;/pre&gt;</description>
    <dc:creator>Jim Pryor</dc:creator>
    <dc:date>2012-04-09T01:12:43</dc:date>
  </item>
  <textinput rdf:about="http://search.gmane.org/?group=$group=gmane.comp.shells.dash">
    <title>Search Engine</title>
    <description>Search the mailing list at Gmane</description>
    <name>query</name>
    <link>http://search.gmane.org/?group=$group=gmane.comp.shells.dash</link>
  </textinput>
</rdf:RDF>

