From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 3029 invoked by alias); 23 Apr 2018 14:18:30 -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: List-Unsubscribe: X-Seq: 42706 Received: (qmail 6586 invoked by uid 1010); 23 Apr 2018 14:18:30 -0000 X-Qmail-Scanner-Diagnostics: from mailout1.w1.samsung.com by f.primenet.com.au (envelope-from , uid 7791) with qmail-scanner-2.11 (clamdscan: 0.99.2/21882. spamassassin: 3.4.1. Clear:RC:0(210.118.77.11):SA:0(-6.9/5.0):. Processed in 2.062245 secs); 23 Apr 2018 14:18:30 -0000 X-Spam-Checker-Version: SpamAssassin 3.4.1 (2015-04-28) on f.primenet.com.au X-Spam-Level: X-Spam-Status: No, score=-6.9 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_HI, RCVD_IN_MSPIKE_H2,SPF_HELO_PASS,SPF_PASS,T_DKIMWL_WL_HIGH,T_DKIM_INVALID autolearn=ham autolearn_force=no version=3.4.1 X-Envelope-From: p.stephenson@samsung.com X-Qmail-Scanner-Mime-Attachments: | X-Qmail-Scanner-Zip-Files: | DKIM-Filter: OpenDKIM Filter v2.11.0 mailout1.w1.samsung.com 20180423140903euoutp015b1fd9412d9c46d50a719c0f3cddfc0f~oFeRBxH_W2261222612euoutp01n DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=samsung.com; s=mail20170921; t=1524492544; bh=KpkGaQS9TYtuPZWA0bbS1BSk0As7Sd6x2WF0720UW3c=; h=Date:From:To:Subject:In-reply-to:References:From; b=XFY6nH3TY1Dvy56jmOSI5OJwNyIyI8PecN7T04n3+jCDowhgS2yCNvkGQJj79Cr3g 3wgmDID1IcCRoltYdqDdB4sZPfnK4OAzrRJBy+c/Hhy8Xpk9qxrhKG6nuqtd+WYMZ9 iP2kr/JUnkoM15lfoZbl5EZ77UriiDZy3xVknPGY= X-AuditID: cbfec7f4-6f9ff700000043e4-83-5adde8fc981b Date: Mon, 23 Apr 2018 15:08:43 +0100 From: Peter Stephenson To: Zsh hackers' list Subject: Re: "echo | ps -j $(:) | cat | cat | cat" runs components in different process groups Message-id: <20180423150843.097c2743@camnpupstephen.cam.scsc.local> In-reply-to: <20180423150312.5e0c0416@camnpupstephen.cam.scsc.local> Organization: SCSC X-Mailer: Claws Mail 3.13.2 (GTK+ 2.24.30; x86_64-pc-linux-gnu) MIME-version: 1.0 Content-type: text/plain; charset="UTF-8" Content-transfer-encoding: quoted-printable X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFnrMIsWRmVeSWpSXmKPExsWy7djP87p/XtyNMmharG9xsPkhkwOjx6qD H5gCGKO4bFJSczLLUov07RK4Mjq3TmYvuMNWsabtJVsD4z+WLkZODgkBE4mJK6+ydjFycQgJ rGCU6D+/lQnC6WWS+Pesgx2m6seJ41BVyxgl5tzshnKmMUlc/32aDcI5wyhx7ORuZgjnAqPE hOZ+oAwHB4uAqsTvhzogo9gEDCWmbprNCGKLCGhLfPoM0szJISyQIHF2zw4mEJtXwFli0ttG dpBWTgEXiZvba0FMfgEhiQvNthAH2Usc3XMSqlpQ4sfke2DvMAtoSmzdvZ4dwtaWePLuAitE /RQ2iS2LjSBsF4lTsw9BPSYs8er4FihbRqKz4yDY9xICzYwSa+/fZ4NI9DBKzFocCmFbS/Td vsgIsYBPYtK26cwgt0kI8Ep0tAlBlHhItDY+hmp1lPi58QIjJEQWcki035/BPoFRfhaSu2ch uXsWkrsXMDKvYhRPLS3OTU8tNspLLdcrTswtLs1L10vOz93ECIz60/+Of9nBuOtP0iFGAQ5G JR7eHbp3o4RYE8uKK3MPMUpwMCuJ8HpsAwrxpiRWVqUW5ccXleakFh9ilOZgURLnjdOoixIS SE8sSc1OTS1ILYLJMnFwSjUw5qi/FH1q7WR6Tq5jmbX89xmMb/aa2PxfUx76N3CzsFuuzTt2 5/8LDvp9XrVa4516vNTTPnfmE9/bpE+6i718tDb772r1pEV35xtULOFJs/a8zx0786DGF5Pg Lbo9nrOEi3x7Z5lfOF/y4EPKPkPOxVezPv3z8NgmL88749nHjg3lITv9HKeaKbEUZyQaajEX FScCAOlLfhX2AgAA X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFjrELMWRmVeSWpSXmKPExsVy+t/xy7q/X9yNMpizRdLiYPNDJgdGj1UH PzAFMEZx2aSk5mSWpRbp2yVwZXRuncxecIetYk3bS7YGxn8sXYycHBICJhI/Thxn7WLk4hAS WMIo0bH3FSOEM4NJYmLvNGYI5xyjxJTWRUwQzgVGiVV/ngL1c3CwCKhK/H6oAzKKTcBQYuqm 2YwgtoiAtsSnz6fZQGxhgQSJRU8mgMV5BZwlJr1tZAdp5RRwkbi5vRZi5Fl2idZv38Hi/AJC EheabSGus5c4uuckE0SroMSPyffArmYWUJeYNG8RM4StLfHk3QVWEFsIKH7j7m72CYxCs5C0 zELSMgtJywJG5lWMIqmlxbnpucWGesWJucWleel6yfm5mxiBIbvt2M/NOxgvbQw+xCjAwajE w7tD926UEGtiWXFl7iFGCQ5mJRFej21AId6UxMqq1KL8+KLSnNTiQ4zSHCxK4rznDSqjhATS E0tSs1NTC1KLYLJMHJxSDYw2G7oaPkhcmPRQObeflf3UbJU7r67tP2rf0zzJZI+5TxVH5dKe ZW+aulgad9w/I2jyY2+eRarRg7+R0Ysldt3c96RBYtGiO22TdjCunKa+99nxczN9JdfEswTc WBubrNK8e2FC83bXdZVP9slft5WNT0tMffujZnlItSln1+wuIydjsz/m++SUWIozEg21mIuK EwGMMG2MVQIAAA== X-CMS-MailID: 20180423140859eucas1p2591bf1422614209979d4890383268c37 X-Msg-Generator: CA CMS-TYPE: 201P X-CMS-RootMailID: 20180423140859eucas1p2591bf1422614209979d4890383268c37 X-RootMTR: 20180423140859eucas1p2591bf1422614209979d4890383268c37 References: <180323221959.ZM27569@torch.brasslantern.com> <180324150945.ZM32251@torch.brasslantern.com> <20180410124545.13fccd5d@camnpupstephen.cam.scsc.local> <20180410145926.64c4f671@camnpupstephen.cam.scsc.local> <180411151025.ZM19332@torch.brasslantern.com> <20180412172342.52df6b10@camnpupstephen.cam.scsc.local> <20180415162326.GA12549@chaz.gmail.com> <20180415185804.GB12549@chaz.gmail.com> <180416223910.ZM32002@torch.brasslantern.com> <20180417101947.5fd347df@camnpupstephen.cam.scsc.local> <180417090926.ZM2456@torch.brasslantern.com> <20180417173558.769503bd@camnpupstephen.cam.scsc.local> <180417105243.ZM2929@torch.brasslantern.com> <20180419104039.7b86ed2b@camnpupstephen.cam.scsc.local> <20180423145238.2c296ec3@camnpupstephen.cam.scsc.local> <20180423150312.5e0c0416@camnpupstephen.cam.scsc.local> On Mon, 23 Apr 2018 15:03:12 +0100 Peter Stephenson wrote: > The main reason I didn't do this is the effect of killpg with signal 0 > isn't actually defined in the Linu man pages or as far as I can see in > POSIX. But we do this elsewhere so presumably it's a well-known fact > this works... After enough poking in manuals, this certainly looks pukka on Linux... "man killpg" sez On Linux, killpg() is implemented as a library function that makes = the call kill(-pgrp, sig). and "man 2 kill" sez If sig is 0, then no signal is sent, but error checking is still p= er=E2=80=90 formed; this can be used to check for the existence of a process ID = or process group ID. Given it's already all over the shell it's obviously the right thing to do here, too. pws