From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 15813 invoked by alias); 3 Jan 2014 17:52:35 -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: 32226 Received: (qmail 18664 invoked from network); 3 Jan 2014 17:52:20 -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=0PN0aFICcUldcgPLGzF8vTKUOHQIeclkGV1WGshPlAY=; b=l9PhrUYoQdvDrVQFcXo+AOhbL75nlm1G3v98G90AXPjLIMlKVjb8ZdWavAPui9SbzB 4EJYhchnBbsrU6iiqWzarGxR8c2Iob/dnWwQYTNhSuITrlTtZguVvdq3t2j+QEOJB6pU f/gUSFhEWxHAH6N64sfXn+Cs0MR2iiDtmxacsjCOtRS0zVAtYT8FEuAaBpbtDsx9iIfM /ajnjXxbfoUN/pfIRCIsdHwZ8xYvYcszonr1LtmgAxEnRnzFA2wqdf0yQA/ugiSdzzHY KBXYW2CpRe8xbugVUaBCXUQAjeAwyt1CFOTtd9jQA4sIAr8KlZuP2rfCdpjDmiiL1RbS QbZQ== X-Gm-Message-State: ALoCoQlMmFyiA/M8VGdqLs1p9lyuxw3VGJ5Q3N2SQp1dA8+v4x2lTyHdoHasqed1OB/SztpH7vUQ X-Received: by 10.180.93.130 with SMTP id cu2mr2829676wib.38.1388771085393; Fri, 03 Jan 2014 09:44:45 -0800 (PST) X-ProxyUser-IP: 86.6.157.246 Date: Fri, 3 Jan 2014 17:44:41 +0000 From: Peter Stephenson To: zsh-workers@zsh.org Subject: Re: Possible signal handling issues Message-ID: <20140103174441.69f3d37d@pws-pc.ntlworld.com> In-Reply-To: <140102235242.ZM10573@torch.brasslantern.com> References: <131228150234.ZM27671@torch.brasslantern.com> <20140102215505.323946ce@pws-pc.ntlworld.com> <20140102224031.1f175f26@pws-pc.ntlworld.com> <20140102225336.2fa58a39@pws-pc.ntlworld.com> <140102235242.ZM10573@torch.brasslantern.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, 02 Jan 2014 23:52:42 -0800 Bart Schaefer wrote: > 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. Hmm... My experience suggests (but doesn't conclusively show) that the signal doesn't get delivered *during* the trap handler (since if you prolong its life artificially the signal is ignored), but may sometimes be delivered *afterwards*, and that the latter is what's causing the funny effects. As there's no way of ensuring a signal gets delivered to where it's going promptly, since they're by their nature asynchronous, it therefore didn't struck me as particularly significant that in that case you could trigger the trap to run again. I can't think of anything I'd want to do to make it better, is another way of putting it. pws