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