From 983085923ae1d45196868b48f576b1a19e03e72b Mon Sep 17 00:00:00 2001 From: Herbert Xu Date: Sat, 19 May 2018 02:39:40 +0800 Subject: mkinit: Split reset into exitreset and reset Previously reset was called after exitshell. This was changed so that it was called before exitshell because certain state needed to be reset in order for the EXIT trap to work. However, this caused issues because certain other states (such as local variables) should not be reset. This patch fixes this by creating a new function exitreset that is called prior to exitshell and moving reset back to its original location. Signed-off-by: Herbert Xu --- src/eval.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/eval.c') diff --git a/src/eval.c b/src/eval.c index 39c4e41..1b803db 100644 --- a/src/eval.c +++ b/src/eval.c @@ -112,7 +112,7 @@ STATIC const struct builtincmd bltin = { #ifdef mkinit INCLUDE "eval.h" -RESET { +EXITRESET { evalskip = 0; loopnest = 0; if (savestatus >= 0) { -- cgit 1.4.1