summaryrefslogtreecommitdiffstats
path: root/tools
diff options
context:
space:
mode:
authorjilles <jilles@FreeBSD.org>2011-01-01 15:25:15 +0000
committerjilles <jilles@FreeBSD.org>2011-01-01 15:25:15 +0000
commit3487ce2142ebad8aa3e9da94c0ddab802eea3875 (patch)
tree173d39343fba384529de6c4e1b11efe070dd6bd0 /tools
parent939106871155409dce420e35c6794821dd375a48 (diff)
downloadFreeBSD-src-3487ce2142ebad8aa3e9da94c0ddab802eea3875.zip
FreeBSD-src-3487ce2142ebad8aa3e9da94c0ddab802eea3875.tar.gz
sh: Test that exit $? replaces the original exit status in an EXIT trap.
Diffstat (limited to 'tools')
-rw-r--r--tools/regression/bin/sh/builtins/exit1.06
1 files changed, 6 insertions, 0 deletions
diff --git a/tools/regression/bin/sh/builtins/exit1.0 b/tools/regression/bin/sh/builtins/exit1.0
new file mode 100644
index 0000000..496d448
--- /dev/null
+++ b/tools/regression/bin/sh/builtins/exit1.0
@@ -0,0 +1,6 @@
+# $FreeBSD$
+
+# exit with an argument should overwrite the exit status in an EXIT trap.
+
+trap 'true; exit $?' 0
+false
OpenPOWER on IntegriCloud