From a57977d01acc3b1b63aec1b79394ef7ffd052912 Mon Sep 17 00:00:00 2001 From: Peter Stephenson Date: Tue, 8 Nov 2016 13:02:24 +0000 Subject: 39870: ensure exit trap can always run --- Src/builtin.c | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'Src/builtin.c') diff --git a/Src/builtin.c b/Src/builtin.c index 6c9d05872..696971944 100644 --- a/Src/builtin.c +++ b/Src/builtin.c @@ -5435,6 +5435,11 @@ zexit(int val, int from_where) } } lastval = val; + /* + * Now we are committed to exiting any previous state + * is irrelevant. Ensure trap can run. + */ + errflag = intrap = 0; if (sigtrapped[SIGEXIT]) dotrap(SIGEXIT); callhookfunc("zshexit", NULL, 1, NULL); -- cgit 1.4.1