From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 21899 invoked by alias); 25 Nov 2010 21:46:44 -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: 28452 Received: (qmail 25470 invoked from network); 25 Nov 2010 21:46:41 -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, T_TO_NO_BRKTS_FREEMAIL autolearn=ham version=3.3.1 Received-SPF: pass (ns1.primenet.com.au: SPF record at _spf.google.com designates 209.85.215.171 as permitted sender) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:from:reply-to:to:subject:date :user-agent:references:in-reply-to:mime-version:content-type :content-transfer-encoding:message-id; bh=+eMAKoNRxxtJbdLU00b1y0rvHWKviIC7ThghiFpoYys=; b=TJaas5vkpJxuLjZN/xgfCIOQI9/sFQUNAhtM0AMnhYAOceYOKdLrmqjT1iownaqtpO X9++dkCAsxHNQ+q9ey4k9KqQd3kRPPR1uAcNkAv3xYBHCYeFViH8aYcLEmIx/PQDmPPC M9qB3y2sjzyIEJK710GmsKA9SUyzeq3AY4D0w= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=from:reply-to:to:subject:date:user-agent:references:in-reply-to :mime-version:content-type:content-transfer-encoding:message-id; b=x4/gKMdRRiEnXaj09fwqXyLq774SvxTVz7c8GMM0wIG2pEM+73Pe5S6AuEfMgdjiWQ a0KWfnpmS1V3TZyAFAa8hk6oVs+K5xRGqOsABYGjUjgRnL894eg9zcvJS7UAfzAD0qQQ SHjQfVveoSCKfJIZVBRmYxUhtXyL7vqi34yj8= From: ZyX Reply-To: zyx.vim@gmail.com To: zsh-workers@zsh.org Subject: Re: `jobs' builtin does not work with pipe in scripts Date: Fri, 26 Nov 2010 00:40:33 +0300 User-Agent: KMail/1.13.5 (Linux/2.6.34-zen1; KDE/4.4.5; x86_64; ; ) References: <201011252341.44512@-zyx> <1290718646-sup-9791@nixos> In-Reply-To: <1290718646-sup-9791@nixos> MIME-Version: 1.0 Content-Type: multipart/signed; boundary="nextPart9931591.MyRtn8ZAkd"; protocol="application/pgp-signature"; micalg=pgp-sha1 Content-Transfer-Encoding: 7bit Message-Id: <201011260040.34189@-zyx> --nextPart9931591.MyRtn8ZAkd Content-Type: Text/Plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Reply to message =C2=ABRe: `jobs' builtin does not work with pipe in script= s=C2=BB,=20 sent 23:57:53 26 November 2010, Friday by Marc Weber: > Excerpts from ZyX's message of Thu Nov 25 21:41:43 +0100 2010: > > zsh -c 'sleep 1s & sleep 1s & jobs -p | while read line ; do echo > > $line ; done' >=20 > What about zsh -i -c ' ... ? It works, but I was trying to use `jobs -p | ...' in a script that is inten= ded=20 to be used as library, so I can't put something like `#!/bin/zsh -i' there.= For=20 now it was replaced with `ps --ppid $$', though I do not like invoking=20 additional process in a signal handler. --nextPart9931591.MyRtn8ZAkd Content-Type: application/pgp-signature; name=signature.asc Content-Description: This is a digitally signed message part. -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.16 (GNU/Linux) iEYEABECAAYFAkzu19IACgkQkOgHluiXxU9owgCglDXzpJbauaEg5YuQEtH586/F Qv8An2Lzgg0FuhvHvSxQTSDYsvj/9UsQ =xfih -----END PGP SIGNATURE----- --nextPart9931591.MyRtn8ZAkd--