zsh-workers
 help / color / mirror / code / Atom feed
From: Vincent Lefevre <vincent@vinc17.net>
To: zsh-workers@zsh.org
Subject: pipeline that cannot be interrupted (was: Ctrl-\ while executing a pipeline made zsh quit)
Date: Tue, 26 Apr 2022 11:18:33 +0200	[thread overview]
Message-ID: <20220426091833.GE100943@zira.vinc17.org> (raw)
In-Reply-To: <20220426090722.GD100943@zira.vinc17.org>

On 2022-04-26 11:07:22 +0200, Vincent Lefevre wrote:
> I wasn't using "mless" in that way, though this may be related to
> what I got. Anyway, I think that this is a bug in zsh; this issue
> is also reproducible with "head -n 1" instead of "less".

Or even simpler:

zira:~> ( zsh -fc 'print a few words; /bin/sleep 10' ) | { head -n 1 }
a few words
^C^C^C^C^C^C^C^C^\^\^\^\%

(the curly brackets are important).

I think that's the same issue I had reported in 2019, for which I got
no replies:

────────────────────────────────────────────────────────────────────────
Date: Fri, 2 Aug 2019 16:51:06 +0200
From: Vincent Lefevre <vincent@vinc17.net>
To: zsh-workers@zsh.org
Subject: [BUG] pipeline that cannot be interrupted with Ctrl-C (regression)

With zsh 5.7.1 under Debian, the following pipeline cannot be
interrupted with Ctrl-C:

  { /bin/sleep 10 ; /bin/sleep 20; } | { /bin/sleep 30 ; /bin/sleep 40; }

But if I remove one of the sleep, it can be interrupted by Ctrl-C.

There was no issue with zsh 5.3.1 (Debian 9).

Note: I mentioned this example in zsh-users in the thread
"kill the LHS command of a pipe once the RHS command terminates".
────────────────────────────────────────────────────────────────────────

See:
  https://www.zsh.org/mla/workers/2019/msg00672.html
  https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=933730

Neither Ctrl-C nor Ctrl-\ has any effect.

-- 
Vincent Lefèvre <vincent@vinc17.net> - Web: <https://www.vinc17.net/>
100% accessible validated (X)HTML - Blog: <https://www.vinc17.net/blog/>
Work: CR INRIA - computer arithmetic / AriC project (LIP, ENS-Lyon)


  reply	other threads:[~2022-04-26  9:18 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-04-26  0:36 Ctrl-\ while executing a pipeline made zsh quit Vincent Lefevre
2022-04-26  0:44 ` Vincent Lefevre
2022-04-26  1:24 ` Bart Schaefer
2022-04-26  3:00   ` Vincent Lefevre
2022-04-26  4:05     ` Bart Schaefer
2022-04-26  9:07       ` Vincent Lefevre
2022-04-26  9:18         ` Vincent Lefevre [this message]
2022-04-26 10:07           ` pipeline that cannot be interrupted Vincent Lefevre
2022-04-27 20:07             ` Bart Schaefer
2022-04-27 20:29               ` Bart Schaefer
2022-04-29  0:24                 ` Bart Schaefer

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=20220426091833.GE100943@zira.vinc17.org \
    --to=vincent@vinc17.net \
    --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).