mirror of
git://git.code.sf.net/p/zsh/code
synced 2025-10-28 17:10:59 +01:00
Save/restore state around DEBUG trap call.
This commit is contained in:
parent
d0303296cd
commit
594ad37c37
2 changed files with 15 additions and 2 deletions
11
Src/exec.c
11
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 *
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue