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

Re: Inconsistent signal handling?



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