summaryrefslogtreecommitdiffstats
path: root/tools
diff options
context:
space:
mode:
authorjilles <jilles@FreeBSD.org>2013-01-13 19:19:40 +0000
committerjilles <jilles@FreeBSD.org>2013-01-13 19:19:40 +0000
commit1af5c5cc5f617aaef7ab78705c5c70caea880cb1 (patch)
tree69e38a953148ba5a234ec291b11123361e88e213 /tools
parent247875210d7ec5d2e7810928c3c2fcfcbd68aa39 (diff)
downloadFreeBSD-src-1af5c5cc5f617aaef7ab78705c5c70caea880cb1.zip
FreeBSD-src-1af5c5cc5f617aaef7ab78705c5c70caea880cb1.tar.gz
sh: Don't lose $? when backquoted command ends with semicolon or newline.
An empty simple command was added and overwrote the exit status with 0. This affects `...` but not $(...). Example: v=`false;`; echo $?
Diffstat (limited to 'tools')
-rw-r--r--tools/regression/bin/sh/expansion/cmdsubst14.05
-rw-r--r--tools/regression/bin/sh/expansion/cmdsubst15.05
2 files changed, 10 insertions, 0 deletions
diff --git a/tools/regression/bin/sh/expansion/cmdsubst14.0 b/tools/regression/bin/sh/expansion/cmdsubst14.0
new file mode 100644
index 0000000..bdbbb82
--- /dev/null
+++ b/tools/regression/bin/sh/expansion/cmdsubst14.0
@@ -0,0 +1,5 @@
+# $FreeBSD$
+
+! v=`false
+
+`
diff --git a/tools/regression/bin/sh/expansion/cmdsubst15.0 b/tools/regression/bin/sh/expansion/cmdsubst15.0
new file mode 100644
index 0000000..31d85d4
--- /dev/null
+++ b/tools/regression/bin/sh/expansion/cmdsubst15.0
@@ -0,0 +1,5 @@
+# $FreeBSD$
+
+! v=`false;
+
+`
OpenPOWER on IntegriCloud