From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 18788 invoked by alias); 23 Mar 2018 16:16:28 -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: 42512 Received: (qmail 8225 invoked by uid 1010); 23 Mar 2018 16:16:28 -0000 X-Qmail-Scanner-Diagnostics: from mail-wm0-f54.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.54):SA:0(-1.9/5.0):. Processed in 9.159663 secs); 23 Mar 2018 16:16:28 -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, 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:subject:message-id:mail-followup-to:mime-version :content-disposition:user-agent; bh=T6XAiO1+AAOwbAi7kwaajWfjH7r4F2trx85cjVIwN84=; b=UD2qKJJgt63pvWgvB8BSr8QHwCyGoU+zuJwXAyvHby22pnMGwstmpBBXi5wD397Y3L eEIw+xpwGrhlZEsUpItqMII+dRUgN+7TsTsL3IA5W5lv0sjiUB5ePQukqzWgfD48g174 Wzqlz+DJ45mDqN3pcCmSEDseBWP7ejS2HlIV4H9UUDi972tgXuztNAMLhjJTbtcXdK1G PjtgSf+4LhodEiIKyvp9QKqSxWxjvgGwzR/vIWgStPVSOJOX5mmGVF1Bu+7xa1s8Zcx8 c6dRVRpT1NakCqu2n9dQkpU+qptZzVkFqUjPXTMHbFhKkKopizkYlHwMRZhUIN4a0/mZ FJjg== 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:subject:message-id:mail-followup-to :mime-version:content-disposition:user-agent; bh=T6XAiO1+AAOwbAi7kwaajWfjH7r4F2trx85cjVIwN84=; b=Bn8w1quAI85eLrteo04/bNbWGPz5KJtp74SNQcXWI0cnkX4F88S6mAOxxtV/zshbbg JxPqbTQZdqwBcAe42FqmpmYZOTd0LPHaDdaXycNoVfUoHcStGSHSAZ8Zjf4m9V3BySaO ecjKCIdI55ZisZu4gEBa7rOEKc6RYkBDxpXxS0CPo2L2e02EG+suIOsPCOoPsVnC6RF6 uZEgcpPInpWPHm3IvMCPVIAZywV+hzqxKqb5uyVMFsSigG+4UR3anVLRfD5pC9PTDJ3K xbgP8c0+m5hiTBAOLyaaZQ4SxyWeu5skcyYeWgd1Xq2d9ht6m97pcS7LjxxjRrCrDSVk mo+w== X-Gm-Message-State: AElRT7EdyXQduRRlKwOjJBw8+SEnHtlA/XR+B5h12O5B74MAccstWoyS itokKE28BDLVwMEkW9SIOvHWRw== X-Google-Smtp-Source: AG47ELvbp6GJVWFinaW9c66uwVa2GnqTWyTF9nRq8By3cRFwtHX2SnTgxXICsaBzBAzD7Xon0QU1YA== X-Received: by 10.28.133.200 with SMTP id h191mr9788808wmd.39.1521821774840; Fri, 23 Mar 2018 09:16:14 -0700 (PDT) Date: Fri, 23 Mar 2018 16:16:13 +0000 From: Stephane Chazelas To: Zsh hackers list Subject: "echo | ps -j $(:) | cat | cat | cat" runs components in different process groups Message-ID: <20180323161612.GB4857@chaz.gmail.com> Mail-Followup-To: Zsh hackers list MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.5.24 (2015-08-30) From https://unix.stackexchange.com/questions/411688/zsh-cant-input-to-terminal-when-piping-stdin-and-stdout-with-variable-command-t $ echo | ps -j $(:) | cat | cat | cat PID PGID SID TTY TIME CMD 4858 4858 4858 pts/4 00:00:02 zsh 23813 23813 4858 pts/4 00:00:00 zsh 23895 23895 4858 pts/4 00:00:00 ps 23896 23896 4858 pts/4 00:00:00 cat 23897 23897 4858 pts/4 00:00:00 cat 23898 23898 4858 pts/4 00:00:00 cat See how they all run in different process groups (they should all be in the same one, same job). Note that the conditions to reproduce the problem seem to be quite specific: - the first pipeline component must be a builtin or compound command - the second component must have a command substitution in the arguments (OK when in targets of redirections). (tested with git head on Debian amd64) -- Stephane