diff options
author | Bart Schaefer <barts@users.sourceforge.net> | 2001-10-13 17:54:28 +0000 |
---|---|---|
committer | Bart Schaefer <barts@users.sourceforge.net> | 2001-10-13 17:54:28 +0000 |
commit | 594ad37c37540735068e24387db7fbf524de9c8c (patch) | |
tree | 95f9f0357684f9b880f1d444d2e0963da1c31e52 /Src | |
parent | d0303296cdd465703ef95930ac254b73280b66bf (diff) | |
download | zsh-594ad37c37540735068e24387db7fbf524de9c8c.tar.gz zsh-594ad37c37540735068e24387db7fbf524de9c8c.tar.xz zsh-594ad37c37540735068e24387db7fbf524de9c8c.zip |
Save/restore state around DEBUG trap call.
Diffstat (limited to 'Src')
-rw-r--r-- | Src/exec.c | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/Src/exec.c b/Src/exec.c index 7bc341116..ed8293b24 100644 --- a/Src/exec.c +++ b/Src/exec.c @@ -886,11 +886,18 @@ execlist(Estate state, int dont_change_job, int exiting) state->pc--; sublist_done: - cmdsp = csp; noerrexit = oldnoerrexit; - if (sigtrapped[SIGDEBUG]) + if (sigtrapped[SIGDEBUG]) { + exiting = donetrap; + ret = lastval; dotrap(SIGDEBUG); + lastval = ret; + donetrap = exiting; + noerrexit = oldnoerrexit; + } + + cmdsp = csp; /* Check whether we are suppressing traps/errexit * * (typically in init scripts) and if we haven't * |