summaryrefslogtreecommitdiff
path: root/Src/zsh.h
diff options
context:
space:
mode:
authorPeter Stephenson <p.w.stephenson@ntlworld.com>2017-08-24 19:46:20 +0100
committerPeter Stephenson <p.w.stephenson@ntlworld.com>2017-08-24 19:46:20 +0100
commit97d4bdbc7e86e6e8da0d4a059b118ffab289d3a9 (patch)
tree4b00406423534eb1b472ca29401e1683c73d9178 /Src/zsh.h
parentd6aa94997750a63712c8928b243b7c61fa73878b (diff)
downloadzsh-97d4bdbc7e86e6e8da0d4a059b118ffab289d3a9.tar.gz
zsh-97d4bdbc7e86e6e8da0d4a059b118ffab289d3a9.zip
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.
Diffstat (limited to 'Src/zsh.h')
-rw-r--r--Src/zsh.h11
1 files changed, 11 insertions, 0 deletions
diff --git a/Src/zsh.h b/Src/zsh.h
index 91e8d7f8c..abe9a9c82 100644
--- a/Src/zsh.h
+++ b/Src/zsh.h
@@ -2122,6 +2122,17 @@ enum source_return {
SOURCE_ERROR = 2
};
+enum noerrexit_bits {
+ /* Suppress ERR_EXIT and traps: global */
+ NOERREXIT_EXIT = 1,
+ /* Suppress ERR_RETURN: per function call */
+ NOERREXIT_RETURN = 2,
+ /* NOERREXIT only needed on way down */
+ NOERREXIT_UNTIL_EXEC = 4,
+ /* Force exit on SIGINT */
+ NOERREXIT_SIGNAL = 8
+};
+
/***********************************/
/* Definitions for history control */
/***********************************/