Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: question about wait in interactive mode
- X-seq: zsh-users 9476
- From: Peter Stephenson <pws@xxxxxxx>
- To: zsh-users@xxxxxxxxxx
- Subject: Re: question about wait in interactive mode
- Date: Wed, 05 Oct 2005 15:05:41 +0100
- In-reply-to: <20051005133459.GA25549@xxxxxxxxxx> 
- Mailing-list: contact zsh-users-help@xxxxxxxxxx; run by ezmlm
- References: <20051005133459.GA25549@xxxxxxxxxx>
Radu Duta wrote:
> zsh gets stuck in what looks like a wait deadlock.
> 
> cat <<END |
> a
> b
> c
> END
> (
> for f in `cat`
> do
> /bin/echo $f &
> done
> wait
> )
Yes, I haven't yet looked at the code but I think wait is confused about
what it should be waiting for.  This code:
  print | (echo & wait)
also hangs (it's the simplest version I've found:  the pipeline and
the subshell are both necessary), but this code:
  (print | { echo &; wait } )
doesn't.
(Further discussion should really go onto zsh-workers which is where
the following remark is aimed.)
I have a horrible feeling this may be to do with the hairy list_pipe
code in exec.c.
-- 
Peter Stephenson <pws@xxxxxxx>                  Software Engineer
CSR PLC, Churchill House, Cambridge Business Park, Cowley Road
Cambridge, CB4 0WZ, UK                          Tel: +44 (0)1223 692070
This message has been scanned for viruses by BlackSpider MailControl - www.blackspider.com
Messages sorted by:
Reverse Date,
Date,
Thread,
Author