Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Re: Interrupting globs (Re: Something rotten in tar completion)

On Sun, 7 Dec 2014 17:07:13 +0000
Peter Stephenson <p.w.stephenson@xxxxxxxxxxxx> 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.


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)
 		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;

Messages sorted by: Reverse Date, Date, Thread, Author