summaryrefslogtreecommitdiffstats
path: root/bin/sh/eval.h
diff options
context:
space:
mode:
authordumbbell <dumbbell@FreeBSD.org>2012-01-16 11:07:46 +0000
committerdumbbell <dumbbell@FreeBSD.org>2012-01-16 11:07:46 +0000
commit8b387a2d35f960b0b880a2b1863250d6a9b4d692 (patch)
tree5791a3a058bf56e166a4607a77c3912f992892ea /bin/sh/eval.h
parent4e22d62dd60e215d56c8fe89a74171b4c90d3f2e (diff)
downloadFreeBSD-src-8b387a2d35f960b0b880a2b1863250d6a9b4d692.zip
FreeBSD-src-8b387a2d35f960b0b880a2b1863250d6a9b4d692.tar.gz
sh: Fix execution of multiple statements in a trap when evalskip is set
Before this fix, only the first statement of the trap was executed if evalskip was set. This is for example the case when: o "-e" is set for this shell o a trap is set on EXIT o a function returns 1 and causes the script to abort Reviewed by: jilles MFC after: 2 weeks
Diffstat (limited to 'bin/sh/eval.h')
-rw-r--r--bin/sh/eval.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/bin/sh/eval.h b/bin/sh/eval.h
index fba6f9a..724e157 100644
--- a/bin/sh/eval.h
+++ b/bin/sh/eval.h
@@ -60,6 +60,7 @@ void evalbackcmd(union node *, struct backcmd *);
#define in_function() funcnest
extern int funcnest;
extern int evalskip;
+extern int skipcount;
/* reasons for skipping commands (see comment on breakcmd routine) */
#define SKIPBREAK 1
OpenPOWER on IntegriCloud