summaryrefslogtreecommitdiffstats
path: root/tools
diff options
context:
space:
mode:
authorjilles <jilles@FreeBSD.org>2011-02-19 13:22:18 +0000
committerjilles <jilles@FreeBSD.org>2011-02-19 13:22:18 +0000
commit8ee6aec3616d50ae9374166927bc1e65317f9672 (patch)
tree7f8287b41bad5603722fb47a67d676e35dffbe11 /tools
parentea4dbdacd2acc2f6266b79f50c00b7be0e451f71 (diff)
downloadFreeBSD-src-8ee6aec3616d50ae9374166927bc1e65317f9672.zip
FreeBSD-src-8ee6aec3616d50ae9374166927bc1e65317f9672.tar.gz
sh: Make execution/fork1.0 work even if the basename of ${SH} is not "sh".
Diffstat (limited to 'tools')
-rw-r--r--tools/regression/bin/sh/execution/fork1.05
1 files changed, 4 insertions, 1 deletions
diff --git a/tools/regression/bin/sh/execution/fork1.0 b/tools/regression/bin/sh/execution/fork1.0
index 225a825..2eeac79 100644
--- a/tools/regression/bin/sh/execution/fork1.0
+++ b/tools/regression/bin/sh/execution/fork1.0
@@ -1,7 +1,10 @@
# $FreeBSD$
+shname=${SH%% *}
+shname=${shname##*/}
+
result=$(${SH} -c 'ps -p $$ -o comm=')
test "$result" = "ps" || exit 1
result=$(${SH} -c 'ps -p $$ -o comm=; :')
-test "$result" = "sh" || exit 1
+test "$result" = "$shname" || exit 1
OpenPOWER on IntegriCloud