aboutsummaryrefslogtreecommitdiff
path: root/tools/regression/bin/sh
diff options
context:
space:
mode:
authorJilles Tjoelker <jilles@FreeBSD.org>2013-10-30 21:36:15 +0000
committerJilles Tjoelker <jilles@FreeBSD.org>2013-10-30 21:36:15 +0000
commitefd1946c355ec8fd033b7b17bb0baf36cf7cfd7c (patch)
treecf8dba030a6e798646ecaa5e0dc061b40914e39d /tools/regression/bin/sh
parent46bcf11d508f4330b988cf010650e84f9ed5a0b2 (diff)
Notes
Diffstat (limited to 'tools/regression/bin/sh')
-rw-r--r--tools/regression/bin/sh/builtins/trap13.08
-rw-r--r--tools/regression/bin/sh/builtins/trap14.010
2 files changed, 18 insertions, 0 deletions
diff --git a/tools/regression/bin/sh/builtins/trap13.0 b/tools/regression/bin/sh/builtins/trap13.0
new file mode 100644
index 000000000000..d90eb08eb242
--- /dev/null
+++ b/tools/regression/bin/sh/builtins/trap13.0
@@ -0,0 +1,8 @@
+# $FreeBSD$
+
+{
+ trap 'exit 0' INT
+ ${SH} -c 'kill -INT $PPID'
+ exit 3
+} &
+wait $!
diff --git a/tools/regression/bin/sh/builtins/trap14.0 b/tools/regression/bin/sh/builtins/trap14.0
new file mode 100644
index 000000000000..97cce8d0d244
--- /dev/null
+++ b/tools/regression/bin/sh/builtins/trap14.0
@@ -0,0 +1,10 @@
+# $FreeBSD$
+
+{
+ trap - INT
+ ${SH} -c 'kill -INT $PPID' &
+ wait
+} &
+wait $!
+r=$?
+[ "$r" -gt 128 ] && [ "$(kill -l "$r")" = INT ]