summaryrefslogtreecommitdiffstats
path: root/tools/regression
diff options
context:
space:
mode:
authorjilles <jilles@FreeBSD.org>2009-06-23 22:03:56 +0000
committerjilles <jilles@FreeBSD.org>2009-06-23 22:03:56 +0000
commitedb926b17d21fc1a0785a20de47062bb42545429 (patch)
treeafc131675e1cce328d901815330d856ed236a735 /tools/regression
parentfafc9ed68230f653b1e5dfc5425cd3569a1dd707 (diff)
downloadFreeBSD-src-edb926b17d21fc1a0785a20de47062bb42545429.zip
FreeBSD-src-edb926b17d21fc1a0785a20de47062bb42545429.tar.gz
Add tests for r194774.
Approved by: ed (mentor) (implicit)
Diffstat (limited to 'tools/regression')
-rw-r--r--tools/regression/bin/sh/execution/fork2.09
1 files changed, 9 insertions, 0 deletions
diff --git a/tools/regression/bin/sh/execution/fork2.0 b/tools/regression/bin/sh/execution/fork2.0
new file mode 100644
index 0000000..35ea3a3
--- /dev/null
+++ b/tools/regression/bin/sh/execution/fork2.0
@@ -0,0 +1,9 @@
+# $FreeBSD$
+
+result=$(sh -c '(/bin/sleep 1)& sleep 0.1; ps -p $! -o comm=; kill $!')
+test "$result" = sleep || exit 1
+
+result=$(sh -c '{ trap "echo trapped" EXIT; (/usr/bin/true); } & wait')
+test "$result" = trapped || exit 1
+
+exit 0
OpenPOWER on IntegriCloud