diff options
author | Bart Schaefer <barts@users.sourceforge.net> | 2001-10-13 17:53:21 +0000 |
---|---|---|
committer | Bart Schaefer <barts@users.sourceforge.net> | 2001-10-13 17:53:21 +0000 |
commit | 4bd3be1153b3acbc6ad84cc30338ec5b5b68b220 (patch) | |
tree | 047a4d602b940431a08176a8ca0f8124c4d87802 /Src | |
parent | 3b9e0363689b06b61ef0533c6afe2b9287381bb4 (diff) | |
download | zsh-4bd3be1153b3acbc6ad84cc30338ec5b5b68b220.tar.gz zsh-4bd3be1153b3acbc6ad84cc30338ec5b5b68b220.tar.xz zsh-4bd3be1153b3acbc6ad84cc30338ec5b5b68b220.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 4f2916eec..aa2e3437b 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 * |