From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 6353 invoked by alias); 7 Dec 2014 18:34:38 -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: 33910 Received: (qmail 15092 invoked from network); 7 Dec 2014 18:34:36 -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 X-CMAE-Score: 0 X-CMAE-Analysis: v=2.1 cv=AKpDk7pY c=1 sm=1 tr=0 a=FT8er97JFeGWzr5TCOCO5w==:117 a=kj9zAlcOel0A:10 a=q2GGsy2AAAAA:8 a=oR5dmqMzAAAA:8 a=-9mUelKeXuEA:10 a=A92cGCtB03wA:10 a=MBNr4jNFv6yWOJm98DEA:9 a=CjuIK1q_8ugA:10 From: Bart Schaefer Message-id: <141207103419.ZM22731@torch.brasslantern.com> Date: Sun, 07 Dec 2014 10:34:19 -0800 In-reply-to: <20141207170713.1a71fe0d@pws-pc.ntlworld.com> Comments: In reply to Peter Stephenson "Re: Interrupting globs (Re: Something rotten in tar completion)" (Dec 7, 5:07pm) References: <20141202155452.647182b4@pwslap01u.europe.root.pri> <141202084858.ZM31517@torch.brasslantern.com> <20141202172654.30e7d380@pwslap01u.europe.root.pri> <141204085606.ZM9146@torch.brasslantern.com> <20141204171226.301e9d2c@pwslap01u.europe.root.pri> <141205002023.ZM19736@torch.brasslantern.com> <20141205145054.655a2f70@pwslap01u.europe.root.pri> <141205100632.ZM508@torch.brasslantern.com> <20141205181330.2b458b46@pwslap01u.europe.root.pri> <20141205203417.2bc66b7b@pws-pc.ntlworld.com> <20141205220717.2f86bdd2@pws-pc.ntlworld.com> <141206211828.ZM15934@torch.brasslantern.com> <20141207170713.1a71fe0d@pws-pc.ntlworld.com> X-Mailer: OpenZMail Classic (0.9.2 24April2005) To: "Zsh Hackers' List" Subject: Re: Interrupting globs (Re: Something rotten in tar completion) MIME-version: 1.0 Content-type: text/plain; charset=us-ascii On Dec 7, 5:07pm, Peter Stephenson wrote: } } Other issues: } } Mikael needs to ^C three times to get back to the command line --- } apparently related to the code from Sven I took at its word. (Sven is Oberon? If that's true, I'd entirely forgotten it.) } I agree we might want to look at some always blocks. BTW, I didn't } actually think through the handling of "always" blocks for this patch, } so it might want looking at. In particular with respect to always-blocks, there should be some way for TRY_BLOCK_ERROR to clear interrupts as well as (maybe even instead of? TRY_BLOCK_INTERRUPT?) internal errors. A trap that returns zero only clears interrupt if there isn't another trap in a deeper scope. Maybe TRY_BLOCK_ERROR does still clear both in the patch, I didn't parse it that carefully. } It's also just occurred to me I may have introduced some rare but } entirely possible read-modify-write races because we set the ERRFLAG_INT } bit in interrupts and set the other and clear both bits separately in } the main shell. I guess it would be better to queue interrupts whenever } we add or remove a single bit of errflag I don't think single bits are a problem because it's always done with bitwise-or. If anything, we'd need to queue any time we clear the interrupt bit, so that a signal that comes in while we're clearing it gets treated as if arrived after clearing. In practice I don't think it makes that much difference.