diff options
author | Peter Stephenson <pws@users.sourceforge.net> | 2011-08-04 08:30:50 +0000 |
---|---|---|
committer | Peter Stephenson <pws@users.sourceforge.net> | 2011-08-04 08:30:50 +0000 |
commit | a3ae9f5d126ee235301322d3ee370e6b2235090c (patch) | |
tree | 29af16a5180393bb5b92ff6973d28b2a615be251 /Src/signals.c | |
parent | 4a3ce8ab89c73f88559d9c48fdb4ed459a8aceef (diff) | |
download | zsh-a3ae9f5d126ee235301322d3ee370e6b2235090c.tar.gz zsh-a3ae9f5d126ee235301322d3ee370e6b2235090c.tar.xz zsh-a3ae9f5d126ee235301322d3ee370e6b2235090c.zip |
29643: set incompfunc to zero when executing hook or trap function
Diffstat (limited to 'Src/signals.c')
-rw-r--r-- | Src/signals.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/Src/signals.c b/Src/signals.c index a848acdbe..81949843f 100644 --- a/Src/signals.c +++ b/Src/signals.c @@ -1184,7 +1184,7 @@ dotrapargs(int sig, int *sigtr, void *sigfn) traplocallevel = locallevel; runhookdef(BEFORETRAPHOOK, NULL); if (*sigtr & ZSIG_FUNC) { - int osc = sfcontext; + int osc = sfcontext, old_incompfunc = incompfunc; HashNode hn = gettrapnode(sig, 0); args = znewlinklist(); @@ -1210,8 +1210,10 @@ dotrapargs(int sig, int *sigtr, void *sigfn) trapisfunc = isfunc = 1; sfcontext = SFC_SIGNAL; + incompfunc = 0; doshfunc((Shfunc)sigfn, args, 1); sfcontext = osc; + incompfunc= old_incompfunc; freelinklist(args, (FreeFunc) NULL); zsfree(name); } else { |