From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 8390 invoked by alias); 7 Dec 2014 17:19:36 -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: 33906 Received: (qmail 3856 invoked from network); 7 Dec 2014 17:19:24 -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-Originating-IP: [86.6.25.230] X-Spam: 0 X-Authority: v=2.1 cv=S8BXwecP c=1 sm=1 tr=0 a=c0CwWhpM9oUd/BnC3z6Gzg==:117 a=c0CwWhpM9oUd/BnC3z6Gzg==:17 a=NLZqzBF-AAAA:8 a=kj9zAlcOel0A:10 a=Xu8PBiniUsJygisALKAA:9 a=CjuIK1q_8ugA:10 Date: Sun, 7 Dec 2014 17:19:20 +0000 From: Peter Stephenson To: "Zsh Hackers' List" Subject: Re: Interrupting globs (Re: Something rotten in tar completion) Message-ID: <20141207171920.0913aae9@pws-pc.ntlworld.com> In-Reply-To: <20141207170713.1a71fe0d@pws-pc.ntlworld.com> 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: 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 Sun, 7 Dec 2014 17:07:13 +0000 Peter Stephenson wrote: > 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. I'm > confused here, too; I put back removing non-interrupt errors (I'll > just refer to errors and interrupts from now on though I realise > that's a bit glib) and it seems to be resetting interrupts somehow. > For now the fix might be simply put back in the previous state with > Sven's statement that it once did something, plus an additional > comment that we're confused, and come back to this when we understand > the general picture later. That's this, which I will commit onto the interrupt_abort branch and push since as noted it just puts the code the way it's been for about two decades. Just be to sure, can Mikael confirm this does remove the need for the extra ^Cs? Thanks. pws diff --git a/Src/jobs.c b/Src/jobs.c index 6e47e5e..3c2a21a 100644 --- a/Src/jobs.c +++ b/Src/jobs.c @@ -1444,7 +1444,19 @@ zwaitjob(int job, int wait_cmd) restore_queue_signals(q); return 128 + last_signal; } - errflag &= ~ERRFLAG_ERROR; + /* Commenting this out makes ^C-ing a job started by a function + stop the whole function again. But I guess it will stop + something else from working properly, we have to find out + what this might be. --oberon + + When attempting to separate errors and interrupts, we + assumed because of the previous comment it would be OK + to remove ERRFLAG_ERROR and leave ERRFLAG_INT set, since + that's the one related to ^C. But that doesn't work. + There's something more here we don't understand. --pws + + errflag = 0; */ + if (subsh) { killjb(jn, SIGCONT); jn->stat &= ~STAT_STOPPED;