From a3ae9f5d126ee235301322d3ee370e6b2235090c Mon Sep 17 00:00:00 2001 From: Peter Stephenson Date: Thu, 4 Aug 2011 08:30:50 +0000 Subject: 29643: set incompfunc to zero when executing hook or trap function --- Src/signals.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'Src/signals.c') 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 { -- cgit 1.4.1