From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on inbox.vuxu.org X-Spam-Level: X-Spam-Status: No, score=-1.0 required=5.0 tests=DKIM_ADSP_CUSTOM_MED, FREEMAIL_FROM,MAILING_LIST_MULTI,RCVD_IN_DNSWL_NONE autolearn=ham autolearn_force=no version=3.4.4 Received: (qmail 32117 invoked from network); 20 May 2020 22:33:01 -0000 Received: from ns1.primenet.com.au (HELO primenet.com.au) (203.24.36.2) by inbox.vuxu.org with ESMTPUTF8; 20 May 2020 22:33:01 -0000 Received: (qmail 27557 invoked by alias); 20 May 2020 22:32:49 -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: 45869 Received: (qmail 23844 invoked by uid 1010); 20 May 2020 22:32:49 -0000 X-Qmail-Scanner-Diagnostics: from mail-oi1-f171.google.com by f.primenet.com.au (envelope-from , uid 7791) with qmail-scanner-2.11 (clamdscan: 0.102.3/25814. spamassassin: 3.4.4. Clear:RC:0(209.85.167.171):SA:0(-2.0/5.0):. Processed in 1.346065 secs); 20 May 2020 22:32:49 -0000 X-Envelope-From: rudiwillalwaysloveyou@gmail.com X-Qmail-Scanner-Mime-Attachments: | X-Qmail-Scanner-Zip-Files: | Received-SPF: pass (ns1.primenet.com.au: SPF record at _netblocks.google.com designates 209.85.167.171 as permitted sender) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to; bh=JLPJybGDbabtR38KSRnJzzfBxzc0JN4WAjDoX4Q0aw4=; b=IFJ2QpEtQkb7/Bg/5pQXFqP8nvrHl4io9aDQ/IxojUUFTKi4bqDsb6gNwZTaaRRUUN 9b7EVT5E2F1gq7KSSK042xcgCKQNRS5N/EX9cE5RdzipTvgkdrJKkDHRjcuu/mx8WKWP /kZ9XDBHwwaUp2uFrc2II9gWi1Z0YP4vwetW2TqNSmlda8cNQWr3RKQ8CeIF9HLi4+eO zd+ohjeaDiRwnopN+MgCj4qII6jiW1Y1Gw/pIG2FQMlYlDShPvA3s7dMBT3kqw7x28fA hOv9LnJW1tWUC0TPUt4kiCXH7P6m91qOxa0YGnomvWeq7sZKHPqnnMr64ox33te74NKX +SRA== X-Gm-Message-State: AOAM532wy7EjcZgnbf7wYRDevpbeEZ2ojiWGrEUviGal8Hi+KJmy66a4 uCWMtX/TqJ8A50q7bbUH2i0ZovgoIoFzRfVxeQE= X-Google-Smtp-Source: ABdhPJwvie+2MeFrIB18bDEHipE3WwQK2pbyoJzGbJJ5kgJin8wDV8eSOzdJhlFgYrUcINbveTPMUryhIOJTHSJKTLk= X-Received: by 2002:aca:1114:: with SMTP id 20mr4660928oir.106.1590013934508; Wed, 20 May 2020 15:32:14 -0700 (PDT) MIME-Version: 1.0 References: <20200513062902.gf6e22g4sqni75x4@chazelas.org> In-Reply-To: <20200513062902.gf6e22g4sqni75x4@chazelas.org> From: Rudi C Date: Thu, 21 May 2020 03:02:03 +0430 Message-ID: Subject: Re: [Bug] Unexpected process suspension To: Bart Schaefer , Rudi C , "zsh-workers@zsh.org" Content-Type: multipart/alternative; boundary="000000000000c1269405a61bf719" --000000000000c1269405a61bf719 Content-Type: text/plain; charset="UTF-8" Considering this bug (or a very similar variant) was reported before and the issue just died a silent death, I think it's a good idea to create a Github repo for tracking zsh issues. Github issue tracker is a lot better than mailing lists, as things have a dichotomy of being open/closed, and can be labeled. It is harder for issues to die a silent death there. It is also easier to contribute to that, and easier to unsubscribe (I don't think one can unsubscribe from a mailing list post one participated in, as people (wisely) use reply-all.). On Wed, May 13, 2020 at 10:59 AM Stephane Chazelas wrote: > 2020-05-12 10:38:38 -0700, Bart Schaefer: > > On Tue, May 12, 2020 at 12:03 AM Rudi C > wrote: > > > > > > mdoc-test () { > > > > > > sleep 0 | sleep 0 > > > cat} > > > > > > echo start |VISUAL=vim command vipe|mdoc-test > > > > > > # zsh: suspended (tty output) > > > > Putting an interactive command in the middle of a pipeline is > > generally not going to work. Vim in particular is pretty aggressive > > about trying to grab a terminal, which will result in processes > > getting SIGTT* because they don't have foreground control of the > > terminal they're trying to use. > [...] > > The thing is vim *should* be in the foreground, all the > processes started in pipeline should be in the same process > group which should be in foreground (so it gets > SIGINT/SIGQUIT/SIGTSTP upon ^C/^\/^Z, so it can read the > terminal, etc) but under some circumstances, zsh fails to put > some processes in that group, which is a bug. > > $ &2 > 127235 127235 > $ &2 | ps > -o pid,pgid,comm > 131569 131569 > PID PGID COMMAND > 124948 124948 zsh > 131569 131569 awk > 131570 131569 ps > 131571 131569 sleep > $ &2 | { :; } > 127410 127410 > $ &2 | { : | :; } > 127496 124948 > > In that latter case, awk is in a different process group > (127496) from the terminal foreground process group (124948 > which here is the process group of the main shell process!). > > -- > Stephane > --000000000000c1269405a61bf719--