zsh-workers
 help / color / mirror / code / Atom feed
From: Bart Schaefer <schaefer@brasslantern.com>
To: Rudi C <rudiwillalwaysloveyou@gmail.com>
Cc: "zsh-workers@zsh.org" <zsh-workers@zsh.org>
Subject: Re: [Bug] Unexpected process suspension
Date: Tue, 12 May 2020 10:38:38 -0700	[thread overview]
Message-ID: <CAH+w=7Zb_zaasw4NSVRt4kznqWEyr17TFqf6N5=7yhBTefH5Dw@mail.gmail.com> (raw)
In-Reply-To: <CAE9z9A3CM6A1AdprdABLoPo_vfPKEnt5+3yLVT7hUbcQYUhT2Q@mail.gmail.com>

On Tue, May 12, 2020 at 12:03 AM Rudi C <rudiwillalwaysloveyou@gmail.com> 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.

Following Daniel's response I tried:

% </dev/null vim | { :|:; cat }
Vim: Warning: Output is not to a terminal
Vim: Warning: Input is not from a terminal

and although vim did open, upon exiting from it and returning to the
command line ZLE is very confused.  Even a hard reset of the terminal
emulator didn't fix it, the stty settings were hosed.

  parent reply	other threads:[~2020-05-12 17:39 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-05-12  7:02 Rudi C
2020-05-12 11:48 ` Daniel Shahaf
2020-05-12 11:53   ` Roman Perepelitsa
2020-05-12 11:57     ` Daniel Shahaf
2020-05-12 12:05       ` Roman Perepelitsa
2020-05-12 13:31     ` Stephane Chazelas
2020-05-12 17:38 ` Bart Schaefer [this message]
2020-05-13  6:29   ` Stephane Chazelas
2020-05-20 22:32     ` Rudi C
2020-05-21  3:33       ` A bug tracker (was: Re: [Bug] Unexpected process suspension) Daniel Shahaf
2020-05-21  4:44         ` Bart Schaefer
2020-05-21 13:39         ` Oliver Kiddle
2020-05-21 16:46           ` Daniel Shahaf

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='CAH+w=7Zb_zaasw4NSVRt4kznqWEyr17TFqf6N5=7yhBTefH5Dw@mail.gmail.com' \
    --to=schaefer@brasslantern.com \
    --cc=rudiwillalwaysloveyou@gmail.com \
    --cc=zsh-workers@zsh.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/zsh/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).