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

Re: pipeline that cannot be interrupted



On Wed, Apr 27, 2022 at 1:07 PM Bart Schaefer <schaefer@xxxxxxxxxxxxxxxx> wrote:
>
> I don't have time right now to dig any further

OK, I fibbed a little ... but I really don't have time to chase down
what is really going on.

> zsh-5.5.1 - a single ^C returns to the prompt

zsh-5.6 - a single ^C returns to the prompt
zsh-5.6.1 - broken as Vincent describes

That points to workers/43409 as the culprit, but ...

> zsh-5.6.2 - first ^C jumps to R2, second ^C to prompt

... that means workers/43446 partly fixed it?

> zsh-5.7.1 - broken in the way Vincent describes

And workers/43535 broke it again.

Naively, the following not-really-a-patch-yet fixes it, and all tests
still pass.

diff --git a/Src/jobs.c b/Src/jobs.c
index af0a1233d..8ed2219bb 100644
--- a/Src/jobs.c
+++ b/Src/jobs.c
@@ -1476,7 +1476,7 @@ addproc(pid_t pid, char *text, int aux, struct
timeval *bgtime,
      * set it for that, too.
      */
     if (gleader != -1) {
-        jobtab[thisjob].gleader = gleader;
+        jobtab[thisjob].gleader = pid /* gleader */;
         if (list_pipe_job_used != -1)
         jobtab[list_pipe_job_used].gleader = gleader;
         /*




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