zsh-workers
 help / color / mirror / code / Atom feed
From: Philippe Troin <phil@fifi.org>
To: Zefram <zefram@fysh.org>
Cc: Peter Stephenson <pws@csr.com>,
	Zsh hackers list <zsh-workers@sunsite.dk>
Subject: Re: Inconsistent signal handling?
Date: 12 Nov 2002 15:29:35 -0800	[thread overview]
Message-ID: <871y5qwen4.fsf@ceramic.fifi.org> (raw)
In-Reply-To: <20021112215751.GB16593@fysh.org>

[-- Attachment #1: Type: text/plain, Size: 919 bytes --]

Zefram <zefram@fysh.org> 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.

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: zsh-ignore-SIGTERM-on-interactive.patch --]
[-- Type: text/x-patch, Size: 420 bytes --]

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);

      reply	other threads:[~2002-11-12 23:29 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-10-26  3:22 Philippe Troin
2002-11-04 14:04 ` Peter Stephenson
2002-11-04 19:22   ` Philippe Troin
2002-11-07 10:58     ` Peter Stephenson
2002-11-07 21:05       ` Philippe Troin
2002-11-08 10:44         ` Peter Stephenson
2002-11-09  1:14           ` Philippe Troin
2002-11-12 21:57             ` Zefram
2002-11-12 23:29               ` Philippe Troin [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=871y5qwen4.fsf@ceramic.fifi.org \
    --to=phil@fifi.org \
    --cc=pws@csr.com \
    --cc=zefram@fysh.org \
    --cc=zsh-workers@sunsite.dk \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/zsh/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).