Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: [PATCH] Fix ctrl-c not working after process substitution
- X-seq: zsh-workers 44216
- From: Peter Stephenson <p.stephenson@xxxxxxxxxxx>
- To: "zsh-workers@xxxxxxx" <zsh-workers@xxxxxxx>
- Subject: Re: [PATCH] Fix ctrl-c not working after process substitution
- Date: Wed, 10 Apr 2019 08:42:18 +0000
- Accept-language: en-GB, en-US
- Cms-type: 201P
- Dkim-filter: OpenDKIM Filter v2.11.0 mailout1.w1.samsung.com 20190410084221euoutp01a8828293946ca4c2b4485cb862e97502~UEFfmp_id2095320953euoutp01V
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=samsung.com; s=mail20170921; t=1554885741; bh=9j6bDVyZLpOoQ2n8TsliMFUNlECKvJsED+Hk+Dx4yMs=; h=From:To:Subject:Date:In-Reply-To:References:From; b=iusfLKwplN+saJi8BE5T3EDM9ikwqIFmIZuKhjXuqWotmi71XrKxVrrk1Ljp5SAE6 oIKcA1tmWPqpGIfTZV4zgOzHirKTWl4Op+yxESYhtCr6eLCED0g4fEZEJCZsqb3zBJ 3w3TP1bVo/8Cvcu5hGgHUcgX2yonD9ZmQBNaiKaQ=
- In-reply-to: <20190409183404.23344-1-ericdfreese@gmail.com>
- List-help: <mailto:zsh-workers-help@zsh.org>
- List-id: Zsh Workers List <zsh-workers.zsh.org>
- List-post: <mailto:zsh-workers@zsh.org>
- List-unsubscribe: <mailto:zsh-workers-unsubscribe@zsh.org>
- Mailing-list: contact zsh-workers-help@xxxxxxx; run by ezmlm
- References: <CGME20190409183514epcas2p3d19839c97731d5b19dc05586ec9346c7@epcas2p3.samsung.com> <20190409183404.23344-1-ericdfreese@gmail.com>
- Thread-index: AQHU7wMk9/h/2HO42USZnWNw1gxHD6Y1A9IA
- Thread-topic: [PATCH] Fix ctrl-c not working after process substitution
On Tue, 2019-04-09 at 12:34 -0600, Eric Freese wrote:
> This is a potential fix for the ctrl-c problem reported in message 43148
>
> You can reproduce the bug by running `zsh -f`, sourcing the following
> .zshrc, and (at the prompt) pressing ^T and then ^C:
>
> foo-request() {
> exec {FD}< <(echo foo)
> zle -F $FD foo-response
> }
>
> foo-response() {
> zle -F $1
> }
>
> zle -N foo-request
> bindkey ^T foo-request
>
> After pressing ^T, ^C doesn't reset the prompt.
>
> I think this is because the forked <(echo foo) process calls
> entersubsh() without ESUB_ASYNC flag and so is set as the terminal's
> controlling process. My hypothesis is that the original process is never
> reset as the terminal's controlling process and thus the SIGINT signals
> are no longer sent to the original process.
>
> Adding ESUB_ASYNC flag to the entersubsh() call fixes the issue. I'm not
> sure though if there are some cases where we don't want to add the flag
> (e.g. when nullexec is 0)?
Thanks, this makes a lot of sense.
With nullexec it's still in a subprocess, so I think that's OK.
Some of the other similar functions use ESUB_ASYNC and some use
ESUB_NOMONITOR --- possibly they should be more consistent.
I'll just apply it as it is.
Cheers
pws
Messages sorted by:
Reverse Date,
Date,
Thread,
Author