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