about summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog5
-rw-r--r--Src/exec.c2
2 files changed, 6 insertions, 1 deletions
diff --git a/ChangeLog b/ChangeLog
index 42060024b..979fa729b 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2020-06-08  Peter Stephenson  <p.w.stephenson@ntlworld.com>
+
+	* uwers/24909: Src/exec.c: Don't clean up files used for
+	substitution until after function has run.
+
 2020-06-08  Doron Behar  <doron.behar@gmail.com>
 
 	* gitlab !14 (fixup): Completion/Linux/Command/_modutils:
diff --git a/Src/exec.c b/Src/exec.c
index 29f4fc5ca..c72d485b2 100644
--- a/Src/exec.c
+++ b/Src/exec.c
@@ -3969,8 +3969,8 @@ execcmd_exec(Estate state, Execcmd_params eparams,
 
 	    if (is_shfunc) {
 		/* It's a shell function */
-		pipecleanfilelist(filelist, 0);
 		execshfunc((Shfunc) hn, args);
+		pipecleanfilelist(filelist, 0);
 	    } else {
 		/* It's a builtin */
 		LinkList assigns = (LinkList)0;