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/redir.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/redir.c') diff --git a/src/redir.c b/src/redir.c index 71b0f77..e67cc0a 100644 --- a/src/redir.c +++ b/src/redir.c @@ -374,7 +374,7 @@ popredir(int drop) INCLUDE "redir.h" -RESET { +EXITRESET { /* * Discard all saved file descriptors. */ -- cgit 1.4.1