diff options
author | Peter Stephenson <pws@users.sourceforge.net> | 2010-05-05 09:49:39 +0000 |
---|---|---|
committer | Peter Stephenson <pws@users.sourceforge.net> | 2010-05-05 09:49:39 +0000 |
commit | a6ea7ab36d73093f3de2d4ae8bdcff22ae474525 (patch) | |
tree | ed64efa350b80bdf47c8d8323cecfa497641804f /Src | |
parent | b0aec8054ca08d82e31b6f83376586e3c174c5d4 (diff) | |
download | zsh-a6ea7ab36d73093f3de2d4ae8bdcff22ae474525.tar.gz zsh-a6ea7ab36d73093f3de2d4ae8bdcff22ae474525.tar.xz zsh-a6ea7ab36d73093f3de2d4ae8bdcff22ae474525.zip |
27947: some cases where we should execute EXIT traps
Diffstat (limited to 'Src')
-rw-r--r-- | Src/exec.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/Src/exec.c b/Src/exec.c index 952d118c1..19afc4ca4 100644 --- a/Src/exec.c +++ b/Src/exec.c @@ -1299,6 +1299,12 @@ sublist_done: lineno = oldlineno; if (dont_change_job) thisjob = cj; + + if (exiting && sigtrapped[SIGEXIT]) { + dotrap(SIGEXIT); + /* Make sure this doesn't get executed again. */ + sigtrapped[SIGEXIT] = 0; + } } /* Execute a pipeline. * @@ -1631,7 +1637,7 @@ execpline2(Estate state, wordcode pcode, entersubsh(((how & Z_ASYNC) ? ESUB_ASYNC : 0) | ESUB_PGRP | ESUB_KEEPTRAP); close(synch[1]); - execcmd(state, input, pipes[1], how, 0); + execcmd(state, input, pipes[1], how, 1); _exit(lastval); } } else { |