diff options
author | jilles <jilles@FreeBSD.org> | 2010-09-11 15:07:40 +0000 |
---|---|---|
committer | jilles <jilles@FreeBSD.org> | 2010-09-11 15:07:40 +0000 |
commit | 2beda3228fedb15b6266577cec362ec352a47ebc (patch) | |
tree | 65e2d7057e7d2471dc1b435372bef06d61070697 /tools | |
parent | 694b7e6c3713db74cbd3cd49f1e718b36a0691ec (diff) | |
download | FreeBSD-src-2beda3228fedb15b6266577cec362ec352a47ebc.zip FreeBSD-src-2beda3228fedb15b6266577cec362ec352a47ebc.tar.gz |
sh: Fix exit status if return is used within a loop condition.
Diffstat (limited to 'tools')
-rw-r--r-- | tools/regression/bin/sh/builtins/return6.4 | 3 | ||||
-rw-r--r-- | tools/regression/bin/sh/builtins/return7.4 | 6 |
2 files changed, 9 insertions, 0 deletions
diff --git a/tools/regression/bin/sh/builtins/return6.4 b/tools/regression/bin/sh/builtins/return6.4 new file mode 100644 index 0000000..e4d8e0d --- /dev/null +++ b/tools/regression/bin/sh/builtins/return6.4 @@ -0,0 +1,3 @@ +# $FreeBSD$ + +while return 4; do exit 3; done diff --git a/tools/regression/bin/sh/builtins/return7.4 b/tools/regression/bin/sh/builtins/return7.4 new file mode 100644 index 0000000..2047373 --- /dev/null +++ b/tools/regression/bin/sh/builtins/return7.4 @@ -0,0 +1,6 @@ +# $FreeBSD$ + +f() { + while return 4; do exit 3; done +} +f |