xref: /freebsd/bin/sh/tests/builtins/trap6.0 (revision a64729f5077d77e13b9497cb33ecb3c82e606ee8)
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