From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 82 invoked from network); 27 Aug 2004 00:24:44 -0000 Received: from news.dotsrc.org (HELO a.mx.sunsite.dk) (130.225.247.88) by ns1.primenet.com.au with SMTP; 27 Aug 2004 00:24:44 -0000 Received: (qmail 90237 invoked from network); 27 Aug 2004 00:24:38 -0000 Received: from sunsite.dk (130.225.247.90) by a.mx.sunsite.dk with SMTP; 27 Aug 2004 00:24:38 -0000 Received: (qmail 29533 invoked by alias); 27 Aug 2004 00:24:27 -0000 Mailing-List: contact zsh-workers-help@sunsite.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 20287 Received: (qmail 29523 invoked from network); 27 Aug 2004 00:24:27 -0000 Received: from unknown (HELO a.mx.sunsite.dk) (130.225.247.88) by 130.225.247.90 with SMTP; 27 Aug 2004 00:24:27 -0000 Received: (qmail 89516 invoked from network); 27 Aug 2004 00:22:28 -0000 Received: from moonbase.zanshin.com (64.84.47.139) by a.mx.sunsite.dk with SMTP; 27 Aug 2004 00:22:26 -0000 Received: from toltec.zanshin.com (toltec.zanshin.com [64.84.47.166]) by moonbase.zanshin.com (8.13.1/8.13.1) with ESMTP id i7R0MOer021317 for ; Thu, 26 Aug 2004 17:22:24 -0700 Date: Thu, 26 Aug 2004 17:22:24 -0700 (PDT) From: Bart Schaefer Reply-To: zsh-workers@sunsite.dk To: zsh-workers@sunsite.dk Subject: Re: zsh exits after delete-char-or-list and two ^Cs In-Reply-To: <20040825170456.GA7526@la-z-boy.comfychair.org> Message-ID: References: <20040825170456.GA7526@la-z-boy.comfychair.org> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-Spam-Checker-Version: SpamAssassin 2.63 on a.mx.sunsite.dk X-Spam-Level: X-Spam-Status: No, hits=-0.0 required=6.0 tests=BAYES_44 autolearn=no version=2.63 X-Spam-Hits: -0.0 On Wed, 25 Aug 2004, Danek Duvall wrote: > This happens with 4.0.6, 4.2.0 and 4.2.1, the first two on Linux, the > latter on Solaris. If I use delete-char-or-list, then hit control-C > twice, the first time cancels the command-line where I hit ^D, and the > second one exits the shell. Looks like the interrupt handler isn't getting reset after the first ctrl-C. I don't yet know why not, but this means that the default SIGINT handler is called on the second ^C, which of course ends the process. There also appears to be a bug in 4.2.x with "zle -I" and "zle -R". This should work: TRAPINT() { zle -I && zle send-break } because "zle -I" is supposed to return zero only when zle is active. However, I get: TRAPINT:zle: widgets can only be called when ZLE is active In any case there are numerous workarounds involving trapping ^C or using "stty" to disable interrupt ... but they all have drawbacks.