From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 14235 invoked from network); 6 Apr 2009 09:04:11 -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.4 required=5.0 tests=AWL,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; 6 Apr 2009 09:04:11 -0000 Received-SPF: none (ns1.primenet.com.au: domain at sunsite.dk does not designate permitted sender hosts) Received: (qmail 36816 invoked from network); 6 Apr 2009 09:03:58 -0000 Received: from sunsite.dk (130.225.247.90) by a.mx.sunsite.dk with SMTP; 6 Apr 2009 09:03:58 -0000 Received: (qmail 4731 invoked by alias); 6 Apr 2009 09:03:35 -0000 Mailing-List: contact zsh-users-help@sunsite.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 13997 Received: (qmail 4718 invoked from network); 6 Apr 2009 09:03:34 -0000 Received: from bifrost.dotsrc.org (130.225.254.106) by sunsite.dk with SMTP; 6 Apr 2009 09:03:34 -0000 Received: from cluster-d.mailcontrol.com (cluster-d.mailcontrol.com [85.115.60.190]) by bifrost.dotsrc.org (Postfix) with ESMTPS id 1A2DF82D4B6C for ; Mon, 6 Apr 2009 11:03:20 +0200 (CEST) Received: from cameurexb01.EUROPE.ROOT.PRI ([193.128.72.68]) by rly23d.srv.mailcontrol.com (MailControl) with ESMTP id n36931xq004327 for ; Mon, 6 Apr 2009 10:03:02 +0100 Received: from news01 ([10.99.50.25]) by cameurexb01.EUROPE.ROOT.PRI with Microsoft SMTPSVC(6.0.3790.3959); Mon, 6 Apr 2009 10:03:00 +0100 Date: Mon, 6 Apr 2009 10:03:00 +0100 From: Peter Stephenson To: zsh-users@sunsite.dk Subject: Re: killed by signal Message-ID: <20090406100300.5c377728@news01> In-Reply-To: <20090406082744.28853.qmail@smasher.org> References: <20090406082744.28853.qmail@smasher.org> Organization: CSR X-Mailer: Claws Mail 3.5.0 (GTK+ 2.12.8; i386-redhat-linux-gnu) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-OriginalArrivalTime: 06 Apr 2009 09:03:00.0610 (UTC) FILETIME=[7C740E20:01C9B696] X-Scanned-By: MailControl A_08_51_00 (www.mailcontrol.com) on 10.68.0.133 X-Virus-Scanned: ClamAV 0.92.1/9206/Sun Apr 5 20:23:11 2009 on bifrost X-Virus-Status: Clean On Mon, 6 Apr 2009 20:27:42 +1200 (NZST) Atom Smasher wrote: > if i understand it correctly... if zsh (or most/all other shells) spawns a > process that is "terminated" by a signal, the exit status returned (to?) > by the shell is 128+SIGNAL. but what about processes that are > stopped/suspended by signals (most likely ^Z, on the command line)? if a > process is stopped/suspended by a ^Z, is there *any* way for the parent > shell to figure out if the process was suspended? or to differentiate if > the return status just happens to be the same as a TSTP signal number? $jobstates (from zsh/parameter) tells you. If that's not the answer you'll have to give more details about what you're actually trying to do (which is often the way to get the most useful results). % sleep 10 & [1] 2117 % kill -TSTP %1 [1] + suspended sleep 10 % print $jobstates suspended:+:2117=suspended -- Peter Stephenson Software Engineer CSR PLC, Churchill House, Cambridge Business Park, Cowley Road Cambridge, CB4 0WZ, UK Tel: +44 (0)1223 692070