From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 19665 invoked by alias); 2 Jan 2014 22:53:47 -0000 Mailing-List: contact zsh-workers-help@zsh.org; run by ezmlm Precedence: bulk X-No-Archive: yes List-Id: Zsh Workers List List-Post: List-Help: X-Seq: 32224 Received: (qmail 22148 invoked from network); 2 Jan 2014 22:53:40 -0000 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on f.primenet.com.au X-Spam-Level: X-Spam-Status: No, score=-2.6 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_LOW autolearn=ham version=3.3.2 X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:date:from:to:subject:message-id:in-reply-to :references:mime-version:content-type:content-transfer-encoding; bh=sB+xJBQyHMeg1k6ht/9ez6ZliZG15hlO/E1hQ8ZGLvg=; b=fk3Y1tacvntcb+bKuKe9/uvmyExJsNQ77Rg2ca44HbkorTKIb5ipWlO0IKrq50lF0I A/Kqr3sEIwV21XDE7p1+KunoUmfbnGUvxg0vdE4KngjWZ0Sk7r6QG+RwzrCgk1GMe0k3 3y3tkE78unskdk74pP61yomXegDGHcsMaQK/Mk9cYUkgIP+XG+35Nhk+iA4N8Gcq8hol SKRW9NmHM+z+Eh54N3ICbn++vBQDe8Cmw/10Ei47wZhKQ2l6doMG7Qcq3lgMrLSmWEjF ZmwNbG0oIwlchPqiTpKFBJrBLDZiiBwysObVhMnjn60frdKNdTEoRAgFAJMedszcF2sh TE/w== X-Gm-Message-State: ALoCoQklQ7ULDW8Lso83WtIkrPhEsmHJuePduKBS2pOIFy0XWTBlAoLrrXEIITjOlCqGET43a7X5 X-Received: by 10.180.21.101 with SMTP id u5mr18780619wie.38.1388703218536; Thu, 02 Jan 2014 14:53:38 -0800 (PST) X-ProxyUser-IP: 86.6.157.246 Date: Thu, 2 Jan 2014 22:53:36 +0000 From: Peter Stephenson To: zsh-workers@zsh.org Subject: Re: Possible signal handling issues Message-ID: <20140102225336.2fa58a39@pws-pc.ntlworld.com> In-Reply-To: <20140102224031.1f175f26@pws-pc.ntlworld.com> References: <131228150234.ZM27671@torch.brasslantern.com> <20140102215505.323946ce@pws-pc.ntlworld.com> <20140102224031.1f175f26@pws-pc.ntlworld.com> X-Mailer: Claws Mail 3.8.0 (GTK+ 2.24.7; x86_64-redhat-linux-gnu) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit On Thu, 2 Jan 2014 22:40:31 +0000 Peter Stephenson wrote: >... > TRAPINT() { set -x; kill -INT $$; } >... > I further note that if I run sleep 20 normally in the foreground > (without the sleep in the trap) I get: > > TRAPINT:0:> kill -INT 25339 > TRAPINT:0:> kill -INT 25339 > > exactly twice. Just to finish off this train of thought: I'm sure Bart remembers this, but it's worth reminding home viewers that if TRAPINT returns status 0, which it usually will with then kill last, then the job controller assumes the signal was already handled, so doesn't take any action to pass the signal on to the job itself. If I add "return 1" to the end of TRAPINT() I only ever see the output once before the job ends. I think I've now lost interest in this... pws