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