From 8b5102ccf5f5b240ab35646c2d72a22c32c4b916 Mon Sep 17 00:00:00 2001
From: Peter Stephenson
Date: Tue, 4 Apr 2017 18:54:10 +0100
Subject: 40933: Ensure we get job text in sourced files.
This was turned off explicitly as it was assumed not to be needed,
but it is when code in a sourced file is suspended.
We'll need to see if this makes start up inefficient.
---
Src/exec.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
(limited to 'Src/exec.c')
diff --git a/Src/exec.c b/Src/exec.c
index 137130e31..f021a0805 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;
--
cgit 1.4.1