From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 11526 invoked by alias); 25 Mar 2018 07:48:33 -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: 42529 Received: (qmail 16740 invoked by uid 1010); 25 Mar 2018 07:48:33 -0000 X-Qmail-Scanner-Diagnostics: from mail-wm0-f49.google.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(74.125.82.49):SA:0(-1.9/5.0):. Processed in 0.495817 secs); 25 Mar 2018 07:48:33 -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=-1.9 required=5.0 tests=BAYES_00,FREEMAIL_FROM, RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H3,RCVD_IN_MSPIKE_WL,SPF_PASS, T_DKIM_INVALID autolearn=ham autolearn_force=no version=3.4.1 X-Envelope-From: stephane.chazelas@gmail.com X-Qmail-Scanner-Mime-Attachments: | X-Qmail-Scanner-Zip-Files: | DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=date:from:to:cc:subject:message-id:mail-followup-to:references :mime-version:content-disposition:in-reply-to:user-agent; bh=LEz9jMx4qsoBpwZ62dxLi61mC0ktpFnQyyvs3nWU810=; b=QM7I9Ooa+FxH5NyGtOpVq3eolkQ97WtVZYaSOrheQjo9eJ2TV+EkQhJya3c9kTAmCY LYSexcqoxFQ0PdRZBuvHTrDqWU+V/IrhLkc206BfxMQ9+x0JvORlQ/DRTf+rOe0IFfG9 QDMeOxKHC6F2fQYLtIwZghmW3mpJcbqN8DiCB0KLIuqB60BNXn99aUPgU6dpy62TNCue gWW86EzyX5QPEW7+NJ+G5eJwCWz357E13pyzZU3jnCJXMIH4OyN+b+/vPWmqGG+ovfjz wf6B3XMSmD8hnue9C9oPwW3Sck/u5ORuVlfLPXMKVbJszYLrrlsKLLVuEkcZMO4oYxIo sqwA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id :mail-followup-to:references:mime-version:content-disposition :in-reply-to:user-agent; bh=LEz9jMx4qsoBpwZ62dxLi61mC0ktpFnQyyvs3nWU810=; b=i1GcfKnpNLU3Mt0BU9dsZn6SKHUaZ6DZcDa//IKrS1ZveXxOg5oq7nhDYd0NTs8Abe XFhIcMjA+awoy/bJGZrx5B+HpyKWkwm34wAMZdopZj+3fwsxW3h7U47OiJiHAwPYSFUW G9sQb/PisDo74B2QNX2pqcYVP3qn8tG2iCAiFCMuaY8XCoD0rRNtpetQl3MbFZ8xFgAv BTGSVxGAMKTBEiJWWhmg+VPBOpMmEmYfD0nhOtlWTJ/YLTuQ8cqnF+BtiTR7eBjkR4Cw +teK5+YveaSlIrViuKLLuPKcJE5+DvdpnEc+9YXdsYUDEEOOhux2JTK2T4iB/OrCFE/C DBlA== X-Gm-Message-State: AElRT7G7OtTaWVHyOagPjuVvUcbrEJ7ciweY7kF2nSAwqHXuM90Sgs23 tHbylC3ROZsf7qFq6Tg36eBSAw== X-Google-Smtp-Source: AG47ELujgldc1la4mXiAptM0spXOmndF+X41/LMqetMTAOyJj4wxBINfBUsR8CET/FlsLnXHIf1xXA== X-Received: by 10.28.126.198 with SMTP id z189mr11503162wmc.135.1521964108955; Sun, 25 Mar 2018 00:48:28 -0700 (PDT) Date: Sun, 25 Mar 2018 08:48:27 +0100 From: Stephane Chazelas To: Bart Schaefer Cc: Zsh hackers list Subject: Re: "echo | ps -j $(:) | cat | cat | cat" runs components in different process groups Message-ID: <20180325074827.GB7561@chaz.gmail.com> Mail-Followup-To: Bart Schaefer , Zsh hackers list References: <20180323161612.GB4857@chaz.gmail.com> <180323163614.ZM10192@torch.brasslantern.com> <180323221959.ZM27569@torch.brasslantern.com> <20180324080514.txxyrb3qiztu4pqt@gmail.com> <20180324173406.GA18604@chaz.gmail.com> <180324152357.ZM32580@torch.brasslantern.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <180324152357.ZM32580@torch.brasslantern.com> User-Agent: Mutt/1.5.24 (2015-08-30) 2018-03-24 15:23:57 -0700, Bart Schaefer: [...] > Zsh would have to block "echo" from *starting* > until the rest of the pipeline was built. Note that it looks as if that's what ksh93 is doing, because looking at strace -f, and even if I add a hundred |cat, echo's write() is only done after all the processes have been started. As I said earlier, while looking at strace output, I don't understand how that works. Unless I'm missing something, it's as if it was not done with syscalls. But then what could it be? Busy loop on shared memory? One would have to look at the code I suppose. Note that with ksh93, like in other shells, one can't delay the creation of the other processes with command substitutions as they are not done in the main process. I suppose pipes could be used. Is it not what zsh already does in other contexts? -- Stephane