From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 20218 invoked by alias); 27 Sep 2013 04:20:14 -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: 31772 Received: (qmail 3773 invoked from network); 27 Sep 2013 04:20:08 -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 Received-SPF: none (ns1.primenet.com.au: domain at closedmail.com does not designate permitted sender hosts) From: Bart Schaefer Message-id: <130926212036.ZM29497@torch.brasslantern.com> Date: Thu, 26 Sep 2013 21:20:36 -0700 In-reply-to: <130926204956.ZM23921@torch.brasslantern.com> Comments: In reply to Bart Schaefer "Re: coredump on C-c" (Sep 26, 8:49pm) References: <130926204956.ZM23921@torch.brasslantern.com> X-Mailer: OpenZMail Classic (0.9.2 24April2005) To: Zsh hackers list Subject: Re: coredump on C-c MIME-version: 1.0 Content-type: text/plain; charset=us-ascii On Sep 26, 8:49pm, Bart Schaefer wrote: } } For example, there may be a performance hit for queuing signals around } all the hash table traversals in the add* and scan* functions. If we } assume restartable syscalls that's probably OK for scan By "that's" I mean "NOT queuing signals there is" in case that wasn't clear. It occurs to me, though, that queuing signals all over hashtable.c may be an over-reaction. Maybe the problem is just with re-entering the endparamscope() routine, and that's where queue_signals() is needed. Which is a much smaller change, and probably harmless even if it does not help: diff --git a/Src/params.c b/Src/params.c index 8649178..d6711e4 100644 --- a/Src/params.c +++ b/Src/params.c @@ -4667,10 +4667,12 @@ startparamscope(void) mod_export void endparamscope(void) { + queue_signals(); locallevel--; /* This pops anything from a higher locallevel */ saveandpophiststack(0, HFILE_USE_OPTIONS); scanhashtable(paramtab, 0, 0, 0, scanendscope, 0); + unqueue_signals(); } /**/