]> git.ipfire.org Git - thirdparty/bash.git/blame - tests/trap.right
Bash-4.2 distribution sources and documentation
[thirdparty/bash.git] / tests / trap.right
CommitLineData
d166f048
JA
1subshell exit
2trap -- 'echo exiting' EXIT
3trap -- 'echo aborting' SIGHUP
4trap -- 'echo aborting' SIGINT
5trap -- 'echo aborting' SIGQUIT
6trap -- 'echo aborting' SIGABRT
7trap -- 'echo aborting' SIGTERM
d166f048 8[20] debug
7117c2d2
JA
9debug line
10[22] debug
d166f048
JA
11trap -- 'echo exiting' EXIT
12trap -- 'echo aborting' SIGHUP
13trap -- 'echo aborting' SIGINT
14trap -- 'echo aborting' SIGQUIT
15trap -- 'echo aborting' SIGABRT
16trap -- 'echo aborting' SIGTERM
17trap -- 'echo [$LINENO] debug' DEBUG
d166f048 18[24] debug
7117c2d2
JA
19func[16] funcdebug
20funcdebug line
21[26] debug
d166f048
JA
22trap -- 'echo exiting' EXIT
23trap -- 'echo aborting' SIGHUP
24trap -- 'echo aborting' SIGINT
25trap -- 'echo aborting' SIGQUIT
26trap -- 'echo aborting' SIGABRT
27trap -- 'echo aborting' SIGTERM
28trap -- 'echo [$LINENO] debug' DEBUG
7117c2d2
JA
29[28] debug
30./trap.tests[33] debug
31./trap.tests[34] debug
b80f6443 32func2[30] debug
7117c2d2
JA
33func2[31] debug
34func2debug line
35./trap.tests[36] debug
36./trap.tests[38] debug
d166f048
JA
37trap -- 'echo exiting' EXIT
38trap -- 'echo aborting' SIGHUP
39trap -- 'echo aborting' SIGINT
40trap -- 'echo aborting' SIGQUIT
41trap -- 'echo aborting' SIGABRT
42trap -- 'echo aborting' SIGTERM
43trap -- '' DEBUG
44trap -- 'echo exiting' EXIT
45trap -- 'echo aborting' SIGHUP
46trap -- 'echo aborting' SIGINT
47trap -- 'echo aborting' SIGQUIT
48trap -- 'echo aborting' SIGABRT
49trap -- 'echo aborting' SIGTERM
50trap -- 'echo exiting' EXIT
51trap -- '' SIGINT
52trap -- 'echo aborting' SIGQUIT
53trap -- 'echo aborting' SIGABRT
54trap -- 'echo aborting' SIGTERM
28ef6c31 550
495aee44 56trap -- '' SIGUSR2
f73dda09
JA
57ERRTRAP
58ERRTRAP
59ERRTRAP
60after falses
61if negation ok
62after negation
63after while
64before false in trap2a.sub
65after false in trap2a.sub
66command substitution
0001803f
CR
67+[6] echo 1
681
69+[7] echo 2
702
71+[8] echo 3
72+[8] cat
73+[8] false
74++[8] echo trap: 8
75trap: 8
76+[9] echo 4
774
78caught a child death
79caught a child death
d166f048 80caught a child death
d166f048 81trap -- 'echo caught a child death' SIGCHLD
cce855bc
JA
82trap -- 'echo exiting' EXIT
83trap -- 'echo aborting' SIGABRT
84trap -- 'echo caught a child death' SIGCHLD
85trap -- '' SIGUSR2
d166f048 86exiting