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

Re: SIGINT/TRAPINT Behaves Differently in 4.3.11



On Thu, Sep 15, 2011 at 7:35 PM,  <sorin.ionescu@xxxxxxxxx> wrote:
>
> I have the following call tree: function prompt_theme_precmd() -> function git-info() -> SUBSHELL -> function git() ->  hub -> Git.
>
> On ZSH 4.3.10, pressing CTRL + C while the above is executing calls the shell's TRAPINT function, which is the expected behaviour, but since 4.3.11, SIGINT is sent only to the executing process (Git), and the shell's TRAPINT function is no longer called.
>
> However, pressing CTRL + C AFTER the prompt has been displayed calls TRAPINT.
>
> Is this a bug, or is this the new expected behaviour?

This may be related to zsh-workers/27169 and the related (extensive)
thread wherein on some platforms the shell was actually exiting on a
SIGINT received by a child process.  As you might be able to discern
from that thread, among other things it was never obvious whether some
of those changes should have been restricted to particular #ifdef
block.

Or it might not be related to that at all.

In any case the signal was likely never actually sent to the shell, it
was instead reacting to the exit status of whatever process did get
the signal.  Possibly the issue here is that now the intervening
subshell is not propagating interrupt via its exit status up to the
parent shell.



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