]> git.saurik.com Git - apple/shell_cmds.git/blob - sh/tests/builtins/trap17.0
shell_cmds-216.60.1.tar.gz
[apple/shell_cmds.git] / sh / tests / builtins / trap17.0
1 # $FreeBSD: head/bin/sh/tests/builtins/trap17.0 297360 2016-03-28 18:58:40Z jilles $
2 # This use-after-free bug probably needs non-default settings to show up.
3
4 v1=nothing v2=nothing
5 trap 'trap "echo bad" USR1
6 v1=trap_received
7 v2=trap_invoked
8 :' USR1
9 kill -USR1 "$$"
10 [ "$v1.$v2" = trap_received.trap_invoked ]