diff options
-rw-r--r-- | shell/hush.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/shell/hush.c b/shell/hush.c index 3ad87b19b..ce7467245 100644 --- a/shell/hush.c +++ b/shell/hush.c | |||
@@ -1358,9 +1358,10 @@ static void hush_exit(int exitcode) | |||
1358 | argv[1] = G.traps[0]; | 1358 | argv[1] = G.traps[0]; |
1359 | argv[2] = NULL; | 1359 | argv[2] = NULL; |
1360 | G.exiting = 1; /* prevent EXIT trap recursion */ | 1360 | G.exiting = 1; /* prevent EXIT trap recursion */ |
1361 | builtin_eval(argv); | ||
1362 | /* Note: G.traps[0] is not cleared! | 1361 | /* Note: G.traps[0] is not cleared! |
1363 | * "trap" will still show it */ | 1362 | * "trap" will still show it, if executed |
1363 | * in the handler */ | ||
1364 | builtin_eval(argv); | ||
1364 | } | 1365 | } |
1365 | 1366 | ||
1366 | #if ENABLE_HUSH_JOB | 1367 | #if ENABLE_HUSH_JOB |