From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 1266 invoked by alias); 10 Apr 2010 01:37:39 -0000 Mailing-List: contact zsh-workers-help@zsh.org; run by ezmlm Precedence: bulk X-No-Archive: yes List-Id: Zsh Workers List List-Post: List-Help: X-Seq: 27871 Received: (qmail 163 invoked from network); 10 Apr 2010 01:37:37 -0000 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on f.primenet.com.au X-Spam-Level: X-Spam-Status: No, score=-2.0 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FROM,RCVD_IN_DNSWL_NONE autolearn=ham version=3.3.1 Received-SPF: pass (ns1.primenet.com.au: SPF record at _spf.google.com designates 209.85.218.213 as permitted sender) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:date:received:message-id :subject:from:to:content-type; bh=PqNNnglFrZZL2QQU89gK7WMpjGnRlOg+foF5psNDa7k=; b=KAAAV6BHjSwuZyhSPtKa/tS90vPxjocFwhhwyEbBVOPRC749Ht0iaRSq4ROWsX9aQl DJJLjIBzyhjRNI81Slv5Msx/sr0BFroPscWA6zKBsoO6EJIP4eC8AYoNUuvDmoA85BVC 6hYrP6/WIis8Ul+7b6E9+GpDSA1PZCRkp7nqY= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:date:message-id:subject:from:to:content-type; b=HUkfnR8OxcAFhujx1ASNOB4Ab5QdeX+fDxsHA53lFKRz7Dxykc48YKbSz5IRSXmCbz BPEhb0StIlyWsGQyCtx+JUYDb+r3Js/LkziTdlTmytsG7kTgIolS0BAb77eaGkJBNAaI 8VvEZjWgnJ7LSxJqypXT7x34Ncwwm+Mmdrw2o= MIME-Version: 1.0 Date: Sat, 10 Apr 2010 03:37:29 +0200 Message-ID: Subject: wait gets confused when second argument exits before first (i think) From: Mikael Magnusson To: zsh workers Content-Type: text/plain; charset=UTF-8 zsh -f localhost% sleep 2 & a=$\! ; sleep 1 & wait $a $\! [1] 31989 [2] 31990 [2] + done sleep 1 [1] + done sleep 2 wait: pid 31990 is not a child of this shell localhost% sleep 2 & a=$\! ; sleep 1 & wait $\! $a [1] 32121 [2] 32122 [2] + done sleep 1 [1] + done sleep 2 localhost% sleep 1 & a=$\! ; sleep 2 & wait $\! $a [1] 32125 [2] 32126 [1] - done sleep 1 [2] + done sleep 2 wait: pid 32125 is not a child of this shell localhost% sleep 2 & sleep 1 & wait %1 %2 [1] 31993 [2] 31994 [2] + done sleep 1 [1] + done sleep 2 wait: %2: no such job localhost% sleep 2 & sleep 1 & wait %2 %1 [1] 31997 [2] 31998 [2] - done sleep 1 [1] + done sleep 2 localhost% sleep 1 & sleep 2 & wait %2 %1 [1] 32001 [2] 32002 [1] + done sleep 1 [2] + done sleep 2 wait: %1: no such job So it looks like it doesn't matter if %1 or %2 exits first, just which is the first argument to wait. Same happens both on current cvs and on 4.3.6. -- Mikael Magnusson