From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 11002 invoked from network); 28 Jul 2009 19:58:58 -0000 X-Spam-Checker-Version: SpamAssassin 3.2.5 (2008-06-10) on f.primenet.com.au X-Spam-Level: X-Spam-Status: No, score=-1.6 required=5.0 tests=AWL,BAYES_00 autolearn=ham version=3.2.5 Received: from new-brage.dotsrc.org (HELO a.mx.sunsite.dk) (130.225.254.104) by ns1.primenet.com.au with SMTP; 28 Jul 2009 19:58:58 -0000 Received-SPF: none (ns1.primenet.com.au: domain at sunsite.dk does not designate permitted sender hosts) Received: (qmail 78092 invoked from network); 28 Jul 2009 19:50:51 -0000 Received: from sunsite.dk (130.225.247.90) by a.mx.sunsite.dk with SMTP; 28 Jul 2009 19:50:51 -0000 Received: (qmail 26602 invoked by alias); 28 Jul 2009 19:50:44 -0000 Mailing-List: contact zsh-workers-help@sunsite.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 27193 Received: (qmail 26565 invoked from network); 28 Jul 2009 19:50:43 -0000 Received: from bifrost.dotsrc.org (130.225.254.106) by sunsite.dk with SMTP; 28 Jul 2009 19:50:43 -0000 Received: from koef.zs64.net (koef.zs64.net [212.12.50.230]) by bifrost.dotsrc.org (Postfix) with ESMTPS id 8159A803081B for ; Tue, 28 Jul 2009 21:50:39 +0200 (CEST) Received: from koef.zs64.net (koef.zs64.net [212.12.50.230]) by koef.zs64.net (8.14.3/8.14.3) with ESMTP id n6RNARb2079155; Tue, 28 Jul 2009 01:10:27 +0200 (CEST) (envelope-from cracauer@koef.zs64.net) Received: (from cracauer@localhost) by koef.zs64.net (8.14.3/8.14.3/Submit) id n6RNAQR7079154; Mon, 27 Jul 2009 19:10:26 -0400 (EDT) (envelope-from cracauer) Date: Mon, 27 Jul 2009 19:10:26 -0400 From: Martin Cracauer To: Bart Schaefer Cc: Martin Cracauer , zsh-workers@sunsite.dk Subject: Re: zsh 4.3.10 terminates with SIGINT when one types Ctrl-G in emacs under Mac OS X Message-ID: <20090727231026.GA78597@cons.org> References: <20090722181841.GA30416@cons.org> <090725115811.ZM23957@torch.brasslantern.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <090725115811.ZM23957@torch.brasslantern.com> User-Agent: Mutt/1.4.2.3i X-Virus-Scanned: ClamAV 0.94.2/9626/Tue Jul 28 19:27:09 2009 on bifrost X-Virus-Status: Clean Bart Schaefer wrote on Sat, Jul 25, 2009 at 11:58:11AM -0700: > On Jul 22, 2:18pm, Martin Cracauer wrote: > } > } Hi, a friend pointed me to this discussion and I took it as an > } opportunity to fix some minor issues with my SIGINT page. > } > } There would be two ways of dealing with this: > } > } 1) when a child got killed with SIGINT, always abort the script > } 2) do that only when the shell itself also had received a SIGINT while > } that child was executing in the foreground > } > } I have actually implemented 2) in FreeBSD's shell and bash also does > } 2). However, I had skipped over that detail when writing the webpage. > } The have has been corrected. > } > } (let me know if you want credit on the page) > > Credit me if you like, but it's not necessary. > > Did you also see Eric Blake's assertion that the shell must not un-ignore > a signal if it "starts life" with the signal ignored? That's a "trap" > command restriction I'd never discovered before (and one I'm not very > happy about). I think that goes without saying but I can as well include it. In fact this would be useful if somebody want to change a shellscript's behavior to not abort more than the current program on SIGINT and go forward with the next statement in the script. Martin -- %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% Martin Cracauer http://www.cons.org/cracauer/ FreeBSD - where you want to go, today. http://www.freebsd.org/