diff options
author | Peter Stephenson <pws@users.sourceforge.net> | 2005-02-06 20:36:09 +0000 |
---|---|---|
committer | Peter Stephenson <pws@users.sourceforge.net> | 2005-02-06 20:36:09 +0000 |
commit | 05b06b1c08263af07b2297aac0c842dafca39445 (patch) | |
tree | f64a8e7c40efd43221cfa4bd8f0391e0c993765d /Src/exec.c | |
parent | 64c2db0ca242269c92fac5cc8637580364c2b6f6 (diff) | |
download | zsh-05b06b1c08263af07b2297aac0c842dafca39445.tar.gz zsh-05b06b1c08263af07b2297aac0c842dafca39445.tar.xz zsh-05b06b1c08263af07b2297aac0c842dafca39445.zip |
fix autoloaded trap bug; rejig use of trapfuncs
(now traplists); improve trap tests
Diffstat (limited to 'Src/exec.c')
-rw-r--r-- | Src/exec.c | 7 |
1 files changed, 3 insertions, 4 deletions
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 |