From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 22656 invoked by alias); 3 Jan 2014 07:52:46 -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: 32225 Received: (qmail 16813 invoked from network); 3 Jan 2014 07:52: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=-1.9 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_NONE autolearn=ham version=3.3.2 From: Bart Schaefer Message-id: <140102235242.ZM10573@torch.brasslantern.com> Date: Thu, 02 Jan 2014 23:52:42 -0800 In-reply-to: <20140102225336.2fa58a39@pws-pc.ntlworld.com> Comments: In reply to Peter Stephenson "Re: Possible signal handling issues" (Jan 2, 10:53pm) References: <131228150234.ZM27671@torch.brasslantern.com> <20140102215505.323946ce@pws-pc.ntlworld.com> <20140102224031.1f175f26@pws-pc.ntlworld.com> <20140102225336.2fa58a39@pws-pc.ntlworld.com> X-Mailer: OpenZMail Classic (0.9.2 24April2005) To: zsh-workers@zsh.org Subject: Re: Possible signal handling issues MIME-version: 1.0 Content-type: text/plain; charset=us-ascii On Jan 2, 10:53pm, Peter Stephenson wrote: } } 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 wasn't specifically considering that, but I think it's irrelevant. [*] What I was pointing out is that it shouldn't be possible for signal N to be delivered during the trap handler for that same signal, but the way zsh "queues" signal handlers means that the TRAPN() function is not usually called "during" the delivery of the signal. } I think I've now lost interest in this... Fair enough. [*] It does suggest that Chris Johnson's script could possibly be improved by replacing "kill -HUP $$" with a simple "return 1". Haven't tried it.