From 2337770e015bd73a8670ac8bc450b03b08d4aa87 Mon Sep 17 00:00:00 2001 From: herbert Date: Fri, 25 Feb 2005 22:13:05 +1100 Subject: Do not clobber exit status on EXEVAL. --- src/eval.c | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) (limited to 'src') diff --git a/src/eval.c b/src/eval.c index f7f0aeb..29db5c1 100644 --- a/src/eval.c +++ b/src/eval.c @@ -874,6 +874,12 @@ bail: i = exception; if (i == EXEXIT) goto raise; + if (i == EXEVAL) { + if (oldlvl == shlvl) + goto trap; + else + goto raise; + } status = 2; j = 0; @@ -885,11 +891,11 @@ bail: status = j + 128; exitstatus = status; - if (i == EXINT || (i != EXEVAL && spclbltin > 0) || - oldlvl != shlvl) { + if (i == EXINT || spclbltin > 0) { raise: longjmp(handler->loc, 1); } +trap: FORCEINTON; } break; -- cgit 1.4.1