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