From: Roman Perepelitsa <roman.perepelitsa@gmail.com>
To: Pier Paolo Grassi <pierpaolog@gmail.com>
Cc: Zsh-Users List <zsh-users@zsh.org>
Subject: Re: check if coproc has output
Date: Thu, 19 Jan 2023 17:33:04 +0100 [thread overview]
Message-ID: <CAN=4vMrsdPVCpupM+seAgUvF2_8+P5TQomD70sinkOHXS646YA@mail.gmail.com> (raw)
In-Reply-To: <CAP+y1xA9h9T=0QZ4aUHj2mytzzb8bOcR9-wO=kADZ=mQ1_APNw@mail.gmail.com>
On Thu, Jan 19, 2023 at 5:24 PM Pier Paolo Grassi <pierpaolog@gmail.com> wrote:
>
> if I invoke the .exe directly, eg:
>
> long_running_process.exe | while etc
>
> the ctrl+c is handled correctly, whether if I enclose it in a function like this:
>
> winclip(){
> local cmd=($DOTNET_PRJ/pasteclip/pasteclip.exe $args)
> $cmd "$@"
> }
>
> doing
>
> winclip | while etc
>
> shows the ctrl-c problem
I recall there were recently emails related to unkillable pipelines
and maybe even commits with fixes. You might be able to find them on
zsh-workers.
In any case, you could try to create a minimal test case. For example,
is it necessary to have a `while` loop or can you replace that with a
single read? Is it necessary to invoke the specific executable or can
you invoke something like `sleep 10` instead? Maybe the following
hangs for you?
f() sleep 10
f | read
If not, what must be changed so that it starts hanging?
Roman.
prev parent reply other threads:[~2023-01-19 16:48 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-01-19 15:32 Pier Paolo Grassi
2023-01-19 15:42 ` Pier Paolo Grassi
2023-01-19 16:01 ` Sebastian Gniazdowski
2023-01-19 16:08 ` Pier Paolo Grassi
2023-01-19 16:09 ` Sebastian Gniazdowski
2023-01-19 16:13 ` Pier Paolo Grassi
2023-01-19 16:36 ` Sebastian Gniazdowski
2023-01-19 16:53 ` Pier Paolo Grassi
2023-01-19 16:02 ` Roman Perepelitsa
2023-01-19 16:24 ` Pier Paolo Grassi
2023-01-19 16:33 ` Roman Perepelitsa [this message]
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='CAN=4vMrsdPVCpupM+seAgUvF2_8+P5TQomD70sinkOHXS646YA@mail.gmail.com' \
--to=roman.perepelitsa@gmail.com \
--cc=pierpaolog@gmail.com \
--cc=zsh-users@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).