Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: Using "source" in a function breaks job control
On Thu, Apr 23, 2015 at 1:13 PM, Peter Stephenson
<p.w.stephenson@xxxxxxxxxxxx> wrote:
> On Wed, 22 Apr 2015 21:55:39 -0700
> Bart Schaefer <schaefer@xxxxxxxxxxxxxxxx> wrote:
>> It has something to do with tracking the job table.
>
> Looks like we lost STAT_SUPERJOB in the flags of the job that got
> created when we forked.
That was the needed clue. The problem is that list_pipe_job is wrong
following the return from source(). The complications are that (1)
list_pipe_job is static to exec.c whereas source() is in init.c, and
(2) when I tried exporting list_pipe_job so it could be saved/restored
in source(), it fixed this issue but caused the test for "status of
recently exited background jobs is recorded" to fail (which confuses
me, because I can't see any reason source() would get involved in that
test).
Perhaps source() should be using execsave()/execrestore() instead of
the stack of local copies of the job state globals that it maintains?
Messages sorted by:
Reverse Date,
Date,
Thread,
Author