Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

pipeline that cannot be interrupted (was: Ctrl-\ while executing a pipeline made zsh quit)



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@xxxxxxxxxx>
To: zsh-workers@xxxxxxx
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@xxxxxxxxxx> - 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)




Messages sorted by: Reverse Date, Date, Thread, Author