Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: Inconsistent signal handling?
- X-seq: zsh-workers 17931
- From: Philippe Troin <phil@xxxxxxxx>
- To: Zefram <zefram@xxxxxxxx>
- Subject: Re: Inconsistent signal handling?
- Date: 12 Nov 2002 15:29:35 -0800
- Cc: Peter Stephenson <pws@xxxxxxx>, Zsh hackers list <zsh-workers@xxxxxxxxxx>
- In-reply-to: <20021112215751.GB16593@xxxxxxxx>
- Mailing-list: contact zsh-workers-help@xxxxxxxxxx; run by ezmlm
- References: <1733.1036752289@xxxxxxx> <87n0ojpmsm.fsf@xxxxxxxxxxxxxxxx> <20021112215751.GB16593@xxxxxxxx>
- Sender: Philippe Troin <phil@xxxxxxxx>
Zefram <zefram@xxxxxxxx> writes:
> Philippe Troin wrote:
> >3. zsh no longer ignores SIGTERM).
>
> Ignoring SIGTERM by default in interactive shells is long-established
> consistent behaviour of all Bourne- and C-shell derivatives. This should
> be retained. (It means that an errant kill(1), particularly a "kill 0",
> is unlikely to accidentally terminate the shell.)
Zefram, you are right. Thanks for pointing this out.
Peter, here is a trivial patch that puts this behavior back.
Index: Src/init.c
===================================================================
RCS file: /cvsroot/zsh/zsh/Src/init.c,v
retrieving revision 1.28
diff -b -u -r1.28 init.c
--- Src/init.c 8 Nov 2002 10:43:49 -0000 1.28
+++ Src/init.c 12 Nov 2002 23:28:27 -0000
@@ -904,6 +904,7 @@
#endif
if (interact) {
install_handler(SIGALRM);
+ signal_ignore(SIGTERM);
}
if (jobbing) {
signal_ignore(SIGTTOU);
Phil.
Index: Src/init.c
===================================================================
RCS file: /cvsroot/zsh/zsh/Src/init.c,v
retrieving revision 1.28
diff -b -u -r1.28 init.c
--- Src/init.c 8 Nov 2002 10:43:49 -0000 1.28
+++ Src/init.c 12 Nov 2002 23:28:27 -0000
@@ -904,6 +904,7 @@
#endif
if (interact) {
install_handler(SIGALRM);
+ signal_ignore(SIGTERM);
}
if (jobbing) {
signal_ignore(SIGTTOU);
Messages sorted by:
Reverse Date,
Date,
Thread,
Author