summary refs log tree commit diff
path: root/bin/cash/tests/builtins/trap6.0
blob: e28097a9957f6471d09d055811c181aac026b059 (plain) (blame)
1
2
3
4
5
6
7
8
9
# $FreeBSD: releng/12.0/bin/sh/tests/builtins/trap6.0 217472 2011-01-16 13:56:41Z jilles $

v=$(
	${SH} -c 'trap "echo ok; exit" USR1; kill -USR1 $$' &
	# Suppress possible message about exit on signal
	wait $! >/dev/null 2>&1
)
r=$(kill -l $?)
[ "$v" = "ok" ] && { [ "$r" = "USR1" ] || [ "$r" = "usr1" ]; }