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

Re: Using "source" in a function breaks job control



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.  In the bad case the STAT_ flags are
SUBLEADER|CURSH|INUSE|LOCKED and in the good case there is also
SUPERJOB.  The SUBLEADER in the bad case means that the logic was
probably on roughly the right lines, though that's not a great surprise
since we can see the forked subshell is there.  SUPERJOB can only get
added at one point in execpline(), although it can also be removed but
in that case the job should get WASSUPER which doesn't get removed until
the job is cleared.  So the differences in execpline(), which I never
understood, might be informative.

pws



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