about summary refs log tree commit diff
path: root/Src/signals.c
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/signals.c
parentd6aa94997750a63712c8928b243b7c61fa73878b (diff)
downloadzsh-97d4bdbc7e86e6e8da0d4a059b118ffab289d3a9.tar.gz
zsh-97d4bdbc7e86e6e8da0d4a059b118ffab289d3a9.tar.xz
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/signals.c')
-rw-r--r--Src/signals.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/Src/signals.c b/Src/signals.c
index cad40f4eb..94f379e72 100644
--- a/Src/signals.c
+++ b/Src/signals.c
@@ -652,7 +652,7 @@ zhandler(int sig)
     case SIGINT:
         if (!handletrap(SIGINT)) {
 	    if ((isset(PRIVILEGED) || isset(RESTRICTED)) &&
-		isset(INTERACTIVE) && noerrexit < 0)
+		isset(INTERACTIVE) && (noerrexit & NOERREXIT_SIGNAL))
 		zexit(SIGINT, 1);
             if (list_pipe || chline || simple_pline) {
                 breaks = loops;