diff options
author | jilles <jilles@FreeBSD.org> | 2011-01-01 15:25:15 +0000 |
---|---|---|
committer | jilles <jilles@FreeBSD.org> | 2011-01-01 15:25:15 +0000 |
commit | 3487ce2142ebad8aa3e9da94c0ddab802eea3875 (patch) | |
tree | 173d39343fba384529de6c4e1b11efe070dd6bd0 /tools | |
parent | 939106871155409dce420e35c6794821dd375a48 (diff) | |
download | FreeBSD-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.0 | 6 |
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 |