summaryrefslogtreecommitdiff
path: root/Src/exec.c
diff options
context:
space:
mode:
authorDaniel Shahaf <danielsh@apache.org>2020-03-07 21:50:46 +0000
committerDaniel Shahaf <danielsh@apache.org>2020-03-07 21:50:46 +0000
commitb5f05b29ba3d8884cdcb344fd6e5f62aeaa9a3fc (patch)
tree7142dec586d8f1fb3b9333ff50d6e1083a7b7460 /Src/exec.c
parentdd50f125b5eb65896642d2ff664adefd33f1004c (diff)
parent4ce0cff5e91608598adf4a72318fc868681e398d (diff)
downloadzsh-b5f05b29ba3d8884cdcb344fd6e5f62aeaa9a3fc.tar.gz
zsh-b5f05b29ba3d8884cdcb344fd6e5f62aeaa9a3fc.zip
Merge remote-tracking branch 'origin/5.9'
* origin/5.9: unposted: Move a new incompatibility notice. unposted: Fix trailing whitespace in test expectations. 45342: Add tests for interaction between autoloadable parameters and module loading. 45313: _git: Support completion from outside of a worktree when --git-dir/--work-tree are specified on the command line 45304: Do execute the always block even when the try/always block itself is the last command. 45292: D02glob: Add regression test for macOS stat(2) misbehaviour 45291: A glob with a trailing slash will now match unreadable/unexecutable directories. 45288: _git: Complete bisect/new as well as bisect/bad. 45246: Make --disable-multibyte warn, since the test suite fails in that configuration. 45213: Make --enable-gdbm default to false, rather than default to true with an unavoidable warning. unposted (follow-up to 45131): Extra testing by Mikael 45137: zformat: Allow the specifying minimum width and a dot with an empty maximum width. 45138: Add zformat unit tests. 45131: Make a function that redefines itself preserve its tracedness.
Diffstat (limited to 'Src/exec.c')
-rw-r--r--Src/exec.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/Src/exec.c b/Src/exec.c
index cf99051f0..bca051d4f 100644
--- a/Src/exec.c
+++ b/Src/exec.c
@@ -5318,6 +5318,12 @@ execfuncdef(Estate state, Eprog redir_prog)
*/
removetrapnode(signum);
}
+ /* Is this function traced and redefining itself? */
+ if (funcstack && funcstack->tp == FS_FUNC &&
+ !strcmp(s, funcstack->name)) {
+ Shfunc old = ((Shfunc)shfunctab->getnode(shfunctab, s));
+ shf->node.flags |= old->node.flags & (PM_TAGGED|PM_TAGGED_LOCAL);
+ }
shfunctab->addnode(shfunctab, ztrdup(s), shf);
}
}