Re: wait and ctrl+Z

2012-05-03 Thread Jilles Tjoelker
On Fri, May 04, 2012 at 12:28:17AM +0200, Marc Glisse wrote: > On Fri, 4 May 2012, Herbert Xu wrote: > > Marc Glisse wrote: > >> Hello, > >> I noticed a strange behavior of "wait" when I suspend and resume a script. > >> $ cat a.sh > >> #!/bin/dash > >> (sleep 7; echo blah) & > >> (sleep 7; echo

Re: wait and ctrl+Z

2012-05-03 Thread Marc Glisse
On Fri, 4 May 2012, Herbert Xu wrote: Marc Glisse wrote: Hello, I noticed a strange behavior of "wait" when I suspend and resume a script. $ cat a.sh #!/bin/dash (sleep 7; echo blah) & (sleep 7; echo bloh) & wait ; echo coucou $ ./a.sh ^Z zsh: suspended ./a.sh $ fg [1] + continued ./a.sh

Re: wait and ctrl+Z

2012-05-03 Thread Herbert Xu
Marc Glisse wrote: > Hello, > > I noticed a strange behavior of "wait" when I suspend and resume a script. > > $ cat a.sh > #!/bin/dash > (sleep 7; echo blah) & > (sleep 7; echo bloh) & > wait ; echo coucou > $ ./a.sh > ^Z > zsh: suspended ./a.sh > $ fg > [1] + continued ./a.sh > coucou > $ b