1
0
Fork 0
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:
Bart Schaefer 2001-10-13 17:54:28 +00:00
parent d0303296cd
commit 594ad37c37
2 changed files with 15 additions and 2 deletions

View file

@ -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 *