Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: Bug related to stdin/always/jobcontrol
On Thu, 15 Sep 2016 11:33:15 +0100
Peter Stephenson <p.stephenson@xxxxxxxxxxx> wrote:
> Still issues here --- I tried the last patch on another machine and it's
> OK up to the point where you resume and then exit the job, at which
> point vim exits cleanly but the new superjob (the forked zsh) is
> continued but suspends itself again. Sending it SIGCONT causes it to
> exit normally, so this looks like a race.
I'm a bit stuck on this.
The race is related to the fact that when the new SUPERJOB takes over
it's actually in the same process group as the SUBJOB it's taking over,
which is different from it's own PID, list_pipe_pid, that the code
currently assumes is the pgrp (and is indeed the pgrp in the cases where
everything works --- I've again verified the code on a different
machine here and get the impression faster machines work better).
However, fixing that up doesn't help --- apparently attaching it to the
TTY after the SUBJOB is finished works OK, sending it SIGCONT seems to
be OK, but then it always gets SIGSTOP --- and sending it SIGCONT from
the keyboard allows it to finish. So I have no idea why it's being
stopped after the first SIGCONT. (I tried putting it from the main
shell into a new process group of its own; that succeeds, but still
doesn't help.)
Stepping through the forked zsh that was stopped doesn't suggest
anything, either, as it just executes the remainder of the shell code in
the v function. However, I should have another look at the point where
it gets the pukka SIGSTOP (the one that keeps it out of the way until
the SUBJOB has finisehd) to make sure I'm not missing something there.
I think the code is enough better that I may submit it and wonder what
to do with the remaining problem later, or let Bart have a go when he
gets some time.
pws
Messages sorted by:
Reverse Date,
Date,
Thread,
Author