xref: /freebsd/bin/sh/tests/builtins/trap6.0 (revision 3c4ba5f55438f7afd4f4b0b56f88f2bb505fd6a6)
1# $FreeBSD$
2
3v=$(
4	${SH} -c 'trap "echo ok; exit" USR1; kill -USR1 $$' &
5	# Suppress possible message about exit on signal
6	wait $! >/dev/null 2>&1
7)
8r=$(kill -l $?)
9[ "$v" = "ok" ] && { [ "$r" = "USR1" ] || [ "$r" = "usr1" ]; }
10