diff options
Diffstat (limited to '')
-rw-r--r-- | ChangeLog | 4 | ||||
-rw-r--r-- | src/eval.c | 12 | ||||
-rw-r--r-- | src/trap.c | 7 | ||||
-rw-r--r-- | src/trap.h | 2 |
4 files changed, 16 insertions, 9 deletions
diff --git a/ChangeLog b/ChangeLog index 5ace9ff..f148ef6 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,7 @@ +2010-11-28 Herbert Xu <herbert@gondor.apana.org.au> + + * Fixed trap/return regression due to SKIPEVAL removal. + 2010-10-18 Herbert Xu <herbert@gondor.apana.org.au> * Fix ifsfirst/ifslastp leak in casematch. diff --git a/src/eval.c b/src/eval.c index b966749..ea4afc6 100644 --- a/src/eval.c +++ b/src/eval.c @@ -304,10 +304,16 @@ setstatus: break; } out: - if ((checkexit & exitstatus) || - (pendingsigs && dotrap()) || - (flags & EV_EXIT)) + if (checkexit & exitstatus) + goto exexit; + + if (pendingsigs) + dotrap(); + + if (flags & EV_EXIT) { +exexit: exraise(EXEXIT); + } } diff --git a/src/trap.c b/src/trap.c index 7bd60ab..3d28485 100644 --- a/src/trap.c +++ b/src/trap.c @@ -309,8 +309,7 @@ onsig(int signo) * handlers while we are executing a trap handler. */ -int -dotrap(void) +void dotrap(void) { char *p; char *q; @@ -332,10 +331,8 @@ dotrap(void) evalstring(p, 0); exitstatus = savestatus; if (evalskip) - return evalskip; + break; } - - return 0; } diff --git a/src/trap.h b/src/trap.h index bdd7944..7573fd7 100644 --- a/src/trap.h +++ b/src/trap.h @@ -46,7 +46,7 @@ void clear_traps(void); void setsignal(int); void ignoresig(int); void onsig(int); -int dotrap(void); +void dotrap(void); void setinteractive(int); void exitshell(void) __attribute__((__noreturn__)); int decode_signal(const char *, int); |