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