tuxillo's projects
/
dragonfly.git
/ blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
blame
|
history
|
raw
|
HEAD
sh: Sync with FreeBSD:
[dragonfly.git]
/
tools
/
regression
/
bin
/
sh
/
builtins
/
trap5.0
1
# $FreeBSD: head/tools/regression/bin/sh/builtins/trap5.0 217461 2011-01-15 21:09:00Z jilles $
2
3
set -e
4
trap - USR1
5
initial=$(trap)
6
trap -- -l USR1
7
added=$(trap)
8
[ -n "$added" ]
9
trap - USR1
10
second=$(trap)
11
[ "$initial" = "$second" ]
12
eval "$added"
13
added2=$(trap)
14
added3=$(trap --)
15
[ "$added" = "$added2" ]
16
[ "$added2" = "$added3" ]
17
trap -- - USR1
18
third=$(trap)
19
[ "$initial" = "$third" ]