From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 341 invoked from network); 2 Aug 2008 22:56:51 -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=-2.6 required=5.0 tests=BAYES_00 autolearn=ham version=3.2.5 Received: from news.dotsrc.org (HELO a.mx.sunsite.dk) (130.225.247.88) by ns1.primenet.com.au with SMTP; 2 Aug 2008 22:56:51 -0000 Received-SPF: none (ns1.primenet.com.au: domain at sunsite.dk does not designate permitted sender hosts) Received: (qmail 39653 invoked from network); 2 Aug 2008 22:56:24 -0000 Received: from sunsite.dk (130.225.247.90) by a.mx.sunsite.dk with SMTP; 2 Aug 2008 22:56:24 -0000 Received: (qmail 5314 invoked by alias); 2 Aug 2008 22:56:08 -0000 Mailing-List: contact zsh-workers-help@sunsite.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 25374 Received: (qmail 5282 invoked from network); 2 Aug 2008 22:56:02 -0000 Received: from bifrost.dotsrc.org (130.225.254.106) by sunsite.dk with SMTP; 2 Aug 2008 22:56:02 -0000 Received: from vms173001pub.verizon.net (vms173001pub.verizon.net [206.46.173.1]) by bifrost.dotsrc.org (Postfix) with ESMTP id 87BB9805A42E for ; Sun, 3 Aug 2008 00:55:59 +0200 (CEST) Received: from torch.brasslantern.com ([96.238.220.175]) by vms173001.mailsrvcs.net (Sun Java System Messaging Server 6.2-6.01 (built Apr 3 2006)) with ESMTPA id <0K4Z004ZLX19T1X1@vms173001.mailsrvcs.net> for zsh-workers@sunsite.dk; Sat, 02 Aug 2008 17:55:58 -0500 (CDT) Received: from torch.brasslantern.com (localhost.localdomain [127.0.0.1]) by torch.brasslantern.com (8.13.1/8.13.1) with ESMTP id m72MtuYl001080 for ; Sat, 02 Aug 2008 15:55:56 -0700 Received: (from schaefer@localhost) by torch.brasslantern.com (8.13.1/8.13.1/Submit) id m72MttaX001079 for zsh-workers@sunsite.dk; Sat, 02 Aug 2008 15:55:55 -0700 Date: Sat, 02 Aug 2008 15:55:55 -0700 From: Bart Schaefer Subject: Re: Problems with background jobs in a script. In-reply-to: To: zsh-workers@sunsite.dk Message-id: <080802155555.ZM1078@torch.brasslantern.com> MIME-version: 1.0 X-Mailer: OpenZMail Classic (0.9.2 24April2005) Content-type: text/plain; charset=us-ascii References: Comments: In reply to Dave Yost "Problems with background jobs in a script." (Aug 1, 5:18am) X-Virus-Scanned: ClamAV 0.92.1/7915/Sat Aug 2 05:45:09 2008 on bifrost X-Virus-Status: Clean On Aug 1, 5:18am, Dave Yost wrote: } } All I'm trying to do is to get a script to recursively kill all of } its background processes on exit. (In my case, this should be an } issue only when the script is killed.) Is there a reason that killing the process group and letting the OS deal with propagating the signals will not work? TRAPEXIT() { kill -1 0 } (Change -1 to whatever signal you wanted to send.)