xref: /freebsd/bin/sh/tests/builtins/trap17.0 (revision 8e9b3e707151d136ec95e7f1d37556e39c1e228c)
1# $FreeBSD$
2# This use-after-free bug probably needs non-default settings to show up.
3
4v1=nothing v2=nothing
5trap 'trap "echo bad" USR1
6v1=trap_received
7v2=trap_invoked
8:' USR1
9kill -USR1 "$$"
10[ "$v1.$v2" = trap_received.trap_invoked ]
11