aboutsummaryrefslogtreecommitdiffstats
path: root/shell_cmds/sh/tests/builtins/trap17.0
blob: 35aafe7df33464366f0514dd426552e7ca9d3379 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
# $FreeBSD: head/bin/sh/tests/builtins/trap17.0 297360 2016-03-28 18:58:40Z jilles $
# This use-after-free bug probably needs non-default settings to show up.

v1=nothing v2=nothing
trap 'trap "echo bad" USR1
v1=trap_received
v2=trap_invoked
:' USR1
kill -USR1 "$$"
[ "$v1.$v2" = trap_received.trap_invoked ]