summaryrefslogtreecommitdiffstats
path: root/tools
diff options
context:
space:
mode:
authorjilles <jilles@FreeBSD.org>2009-11-21 20:44:34 +0000
committerjilles <jilles@FreeBSD.org>2009-11-21 20:44:34 +0000
commitb93ea764d1d0def18567c878f714bdd74d2866f9 (patch)
tree56e8951b61d88c5f217bc12e6c6978dd04ba02a0 /tools
parente3acc4fb3576529ef4735fe244ab638a98888963 (diff)
downloadFreeBSD-src-b93ea764d1d0def18567c878f714bdd74d2866f9.zip
FreeBSD-src-b93ea764d1d0def18567c878f714bdd74d2866f9.tar.gz
trap: do not consider a bad signal name a fatal error.
POSIX explicitly prescribes this. Continue processing any other signals and return status 1.
Diffstat (limited to 'tools')
-rw-r--r--tools/regression/bin/sh/builtins/trap3.012
1 files changed, 12 insertions, 0 deletions
diff --git a/tools/regression/bin/sh/builtins/trap3.0 b/tools/regression/bin/sh/builtins/trap3.0
new file mode 100644
index 0000000..41bdd61
--- /dev/null
+++ b/tools/regression/bin/sh/builtins/trap3.0
@@ -0,0 +1,12 @@
+# $FreeBSD$
+
+{
+ trap '' garbage && exit 3
+ trap - garbage && exit 3
+ trap true garbage && exit 3
+ trap '' 99999 && exit 3
+ trap - 99999 && exit 3
+ trap true 99999 && exit 3
+} 2>/dev/null
+test -n "$(trap true garbage TERM 2>/dev/null || trap)" || exit 3
+exit 0
OpenPOWER on IntegriCloud