From 05b06b1c08263af07b2297aac0c842dafca39445 Mon Sep 17 00:00:00 2001 From: Peter Stephenson Date: Sun, 6 Feb 2005 20:36:09 +0000 Subject: fix autoloaded trap bug; rejig use of trapfuncs (now traplists); improve trap tests --- Src/exec.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to 'Src/exec.c') diff --git a/Src/exec.c b/Src/exec.c index abee8329e..3c20f9352 100644 --- a/Src/exec.c +++ b/Src/exec.c @@ -2650,8 +2650,8 @@ entersubsh(int how, int cl, int fake, int revertpgrp) unsettrap(sig); if (!(monitor = isset(MONITOR))) { if (how & Z_ASYNC) { - settrap(SIGINT, NULL); - settrap(SIGQUIT, NULL); + settrap(SIGINT, NULL, 0); + settrap(SIGQUIT, NULL, 0); if (isatty(0)) { close(0); if (open("/dev/null", O_RDWR | O_NOCTTY)) { @@ -3340,13 +3340,12 @@ execfuncdef(Estate state, UNUSED(int do_exec)) /* is this shell function a signal trap? */ if (!strncmp(s, "TRAP", 4) && (signum = getsignum(s + 4)) != -1) { - if (settrap(signum, shf->funcdef)) { + if (settrap(signum, NULL, ZSIG_FUNC)) { freeeprog(shf->funcdef); zfree(shf, sizeof(*shf)); state->pc = end; return 1; } - sigtrapped[signum] |= ZSIG_FUNC; /* * Remove the old node explicitly in case it has -- cgit 1.4.1