Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: empty job texts for suspended .zshrc jobs
On Thu, 30 Mar 2017 14:36:36 -0700
Bart Schaefer <schaefer@xxxxxxxxxxxxxxxx> wrote:
> On Mar 27, 11:20am, Stephane Chazelas wrote:
> }
> } zsh: suspended |
>
> Hm, this is because what you've actually suspended is the "source"
> command; the pipeline is the foreground job of the script file that
> "source" is reading. It's just that "source" doesn't get a slot
> in the job table because semantically it's masquerading as the top
> level shell.
Urm...
Presumably the assumption here was a sourced file wouldn't need the job
text, which presumably is wrong so this fix is reasonable...?
pws
diff --git a/Src/exec.c b/Src/exec.c
index 137130e..f021a08 100644
--- a/Src/exec.c
+++ b/Src/exec.c
@@ -1859,7 +1859,7 @@ execpline2(Estate state, wordcode pcode,
lineno = WC_PIPE_LINENO(pcode) - 1;
if (pline_level == 1) {
- if ((how & Z_ASYNC) || (!sfcontext && !sourcelevel))
+ if ((how & Z_ASYNC) || !sfcontext)
strcpy(list_pipe_text,
getjobtext(state->prog,
state->pc + (WC_PIPE_TYPE(pcode) == WC_PIPE_END ?
@@ -3090,7 +3090,7 @@ execcmd_exec(Estate state, Execcmd_params eparams,
/* Get the text associated with this command. */
if ((how & Z_ASYNC) ||
- (!sfcontext && !sourcelevel && (jobbing || (how & Z_TIMED))))
+ (!sfcontext && (jobbing || (how & Z_TIMED))))
text = getjobtext(state->prog, eparams->beg);
else
text = NULL;
Messages sorted by:
Reverse Date,
Date,
Thread,
Author