From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 16607 invoked from network); 12 Nov 2002 23:29:56 -0000 Received: from sunsite.dk (130.225.247.90) by ns1.primenet.com.au with SMTP; 12 Nov 2002 23:29:56 -0000 Received: (qmail 8244 invoked by alias); 12 Nov 2002 23:29:47 -0000 Mailing-List: contact zsh-workers-help@sunsite.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 17931 Received: (qmail 8235 invoked from network); 12 Nov 2002 23:29:45 -0000 To: Zefram Cc: Peter Stephenson , Zsh hackers list Subject: Re: Inconsistent signal handling? References: <1733.1036752289@csr.com> <87n0ojpmsm.fsf@ceramic.fifi.org> <20021112215751.GB16593@fysh.org> From: Philippe Troin Date: 12 Nov 2002 15:29:35 -0800 In-Reply-To: <20021112215751.GB16593@fysh.org> Message-ID: <871y5qwen4.fsf@ceramic.fifi.org> User-Agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.2 MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" Sender: Philippe Troin --=-=-= Zefram 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. --=-=-= Content-Type: text/x-patch Content-Disposition: attachment; filename=zsh-ignore-SIGTERM-on-interactive.patch 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); --=-=-=--