From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 28918 invoked by alias); 23 Apr 2018 13:52:48 -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: 42704 Received: (qmail 1931 invoked by uid 1010); 23 Apr 2018 13:52:48 -0000 X-Qmail-Scanner-Diagnostics: from mailout2.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.12):SA:0(-6.9/5.0):. Processed in 2.124572 secs); 23 Apr 2018 13:52:48 -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, 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 mailout2.w1.samsung.com 20180423135241euoutp022e90d94d06f668f0e2bd8a55b7cdbd50~oFP_YMux-0120401204euoutp02v DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=samsung.com; s=mail20170921; t=1524491561; bh=p66k2grUDAxsH0JTEJkyJ7ULwlJWhihllZK12U9kOnc=; h=Date:From:To:Subject:In-reply-to:References:From; b=qiLSe2hL5DDjGTxfF9RaG/lNAlonluDkZIBAcfQngncs/H3BEEbgnBojgBOgi1bN9 oalceN029XqbeFK+NCLD+Vs1+xiPFmxEXIJ73nLCmF7yRTbjZqgDOpRbygOhTyeI/m MgAGkLrwGCfSy4iqavevzD9fo8iMPapQtnT8YiSU= X-AuditID: cbfec7f2-1c1ff70000011644-85-5adde528e306 Date: Mon, 23 Apr 2018 14:52:38 +0100 From: Peter Stephenson To: Zsh hackers' list Subject: Re: "echo | ps -j $(:) | cat | cat | cat" runs components in different process groups Message-id: <20180423145238.2c296ec3@camnpupstephen.cam.scsc.local> In-reply-to: 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="US-ASCII" Content-transfer-encoding: 7bit X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFnrCIsWRmVeSWpSXmKPExsWy7djP87oaT+9GGcxcqGtxsPkhkwOjx6qD H5gCGKO4bFJSczLLUov07RK4Mv73fGIq2M9V8WLFPcYGxnkcXYycHBICJhI/Vnxi62Lk4hAS WMEo0fhoEQuE08sk0bG0lw2m6u+hf4wQiWWMEote/oGqmsYk8fnqIXYI5wyjxOuGTUwQzgVG ic27nrCD9LMIqEo8vneFBcRmEzCUmLppNiOILSKgLfHp82mwHcICCRJn9+xgArF5BZwlzp59 ClTDwcEp4Cqx/04iiMkvICRxodkW4iJ7iaN7TkJVC0r8mHwPbDqzgI7Etm2P2SFseYnNa94y Q9RPYZM43h4JYbtI3Di4mRHCFpZ4dXwLO4QtI3F5cjfYYxICzYwSa+/fh3q/h1Fi1uJQCNta ou/2RUaIBXwSk7ZNZwa5TUKAV6KjTQiixEPi2qXPUDMdJVbtbWOFBMltdok7FzYwT2CUn4Xk 7llI7p6F5O4FjMyrGMVTS4tz01OLDfNSy/WKE3OLS/PS9ZLzczcxAuP+9L/jn3Ywfr2UdIhR gINRiYd3h+7dKCHWxLLiytxDjBIczEoivB7bgEK8KYmVValF+fFFpTmpxYcYpTlYlMR54zTq ooQE0hNLUrNTUwtSi2CyTBycUg2MDj/XaXx8s/yQ7FPHxET7jn133mzL6Aj1mfrnjbD70k9r LbbazVzd9nWnv0lhTOO5B4kzlR8+70j4yKm6tvqkTcLRz+VP6u45T8w+yOd5esO6W9NU35ex eMqrBRneqfiWkNL87dW388lzdQyCuHik/rRYPPte5MlY2+D9fsUkTomtb6P7Fvr0KrEUZyQa ajEXFScCAP8c83H3AgAA X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFjrELMWRmVeSWpSXmKPExsVy+t/xa7oaT+9GGXSu5bA42PyQyYHRY9XB D0wBjFFcNimpOZllqUX6dglcGf97PjEV7OeqeLHiHmMD4zyOLkZODgkBE4m/h/4xdjFycQgJ LGGU2HN4FxuEM4NJ4tKNt8wQzjlGiRPrZ0JlLjBKnJy1ih2kn0VAVeLxvSssIDabgKHE1E2z GUFsEQFtiU+fT7OB2MICCRKLnkwAi/MKOEucPfsUyObg4BRwldh/JxEkLCRwm13i8dwKkDC/ gJDEhWZbiOvsJY7uOckE0Sko8WPyPbBNzAJaEpu3NbFC2PISm9eA3AkyRl3ixt3d7BMYhWYh aZmFpGUWkpYFjMyrGEVSS4tz03OLjfSKE3OLS/PS9ZLzczcxAkN227GfW3Ywdr0LPsQowMGo xMO7Q/dulBBrYllxZe4hRgkOZiURXo9tQCHelMTKqtSi/Pii0pzU4kOM0hwsSuK85w0qo4QE 0hNLUrNTUwtSi2CyTBycUg2MHbXKIbzrjoXu9NqltUsrSea8teKOuSyP+722HP+Zrr3Cvyxi 0bYdntu5auPFw2MPafxpYJurx3W7NvtZ3uJpX1MsyqoO+H/s0ZNw57ff0TOn4jPDkiVfJB+c M70x4fPVMpNYrT/6e14ZWoT4XmCzUf/k+Pd/+Ke/TJKHwmWeMobu2rTF8dNZJZbijERDLeai 4kQAVHX5uVUCAAA= X-CMS-MailID: 20180423135240eucas1p28ef4e61322c73f524cb140e5eb7397a5 X-Msg-Generator: CA CMS-TYPE: 201P X-CMS-RootMailID: 20180324221021epcas1p184507a6328dbd505b97db69c1f9d8194 X-RootMTR: 20180324221021epcas1p184507a6328dbd505b97db69c1f9d8194 References: <180323221959.ZM27569@torch.brasslantern.com> <20180324080514.txxyrb3qiztu4pqt@gmail.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> On Mon, 23 Apr 2018 21:58:52 +0900 Jun T wrote: > After the following commit: > > commit 3c74891fcd68d37c1629943f703ac70428e3ce9f > Author: Peter Stephenson > Date: Fri Apr 13 12:09:34 2018 +0100 > > 42630: Improve process group handling in pipelines. > > a simple pipeline like the following fails: > > zsh% ls | less > zsh: done ls | > zsh: suspended (tty output) less > > > With the current master (9e2afb92987d7fd96a838c15b6641cc1b634a825) > 'tty output' is replaced by 'tty input'. Somehow nobody's noticed that yet... I think there's a race, making this only happen sometimes, presumably with greater frequency on some systems than others. That's not going to help matters. I've managed to get it to happen a couple of times. This problem suggesting something basic in the ordering of events. ls has presumably exited and presumably also been reaped, or we don't get the new behaviour --- I guess this happened in such a way that less can't grab the terminal back from the shell. Hmmm --- I wonder if less was already forked and that's the problem? So maybe we should check if there are other processes already forked and avoid resetting the pgrp leader in that case? Does anyone actually know? pws