From 97d4bdbc7e86e6e8da0d4a059b118ffab289d3a9 Mon Sep 17 00:00:00 2001 From: Peter Stephenson Date: Thu, 24 Aug 2017 19:46:20 +0100 Subject: 41590 modified as 41595: make ERR_RETURN more logical. It now operates separately at each function depth. To keep ERR_EXIT global, make the noerrexit variable usd bit flags. Extend tests. --- Src/init.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'Src/init.c') diff --git a/Src/init.c b/Src/init.c index d8c26aca2..87dd2e26d 100644 --- a/Src/init.c +++ b/Src/init.c @@ -1070,7 +1070,7 @@ setupvals(char *cmd, char *runscript, char *zsh_name) sfcontext = SFC_NONE; trap_return = 0; trap_state = TRAP_STATE_INACTIVE; - noerrexit = -1; + noerrexit = NOERREXIT_EXIT | NOERREXIT_RETURN | NOERREXIT_SIGNAL; nohistsave = 1; dirstack = znewlinklist(); bufstack = znewlinklist(); @@ -1199,7 +1199,7 @@ init_signals(void) void run_init_scripts(void) { - noerrexit = -1; + noerrexit = NOERREXIT_EXIT | NOERREXIT_RETURN | NOERREXIT_SIGNAL; if (EMULATION(EMULATE_KSH|EMULATE_SH)) { if (islogin) -- cgit 1.4.1