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