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