Zsh Mailing List Archive
Messages sorted by:
Re: zsh 4.3.10 terminates with SIGINT when one types Ctrl-G in emacs under Mac OS X
- X-seq: zsh-workers 27166
- From: Bart Schaefer <schaefer@xxxxxxxxxxxxxxxx>
- To: zsh-workers@xxxxxxxxxx
- Subject: Re: zsh 4.3.10 terminates with SIGINT when one types Ctrl-G in emacs under Mac OS X
- Date: Sun, 19 Jul 2009 11:31:47 -0700
- In-reply-to: <20090718230930.GB5412@xvii>
- Mailing-list: contact zsh-workers-help@xxxxxxxxxx; run by ezmlm
- References: <schaefer@xxxxxxxxxxxxxxxx> <090712193623.ZM14823@xxxxxxxxxxxxxxxxxxxxxx> <200907131839.n6DIdO6Z003291@xxxxxxxxxxxxxxxxxxx> <20090716162419.GA26179@xxxxxxxxxxxxxxxxxxx> <090717222936.ZM8648@xxxxxxxxxxxxxxxxxxxxxx> <20090718101602.GA5392@xvii> <090718113509.ZM10405@xxxxxxxxxxxxxxxxxxxxxx> <20090718230930.GB5412@xvii>
On Jul 19, 1:09am, Vincent Lefevre wrote:
} Subject: Re: zsh 4.3.10 terminates with SIGINT when one types Ctrl-G in em
} > } [bash] ignores SIGINT if the caller chose to ignore it; also when
} > } executing a process, it restores the trap to the default behavior,
} > } in case it was ignored (that's another difference with zsh).
} > And that's a case where I think the zsh behavior is in fact preferable.
} Is there any reason?
If bash really "restores the trap to the default behavior, in case it was
ignored" then I think bash is wrong because "the default behavior" is to
exit on the signal. It should instead continue to ignore it, as requested
by the caller, as would have happened if the caller directly exec'd the
process instead of passing through bash along the way.
The patch I just sent for Src/signals.c sidesteps the issue in the way I
previously mentioned: without changing the eventual handling, it holds
SIGINT undelivered until some other signal interrupts signal_suspend().
Hmm, looking at the #ifdef flow and considering that this affects MacOS,
maybe the change in my patch needs to be in the BSD_SIGNALS section,
either instead or as well.
Messages sorted by: