File tree Expand file tree Collapse file tree 1 file changed +8
-1
lines changed Expand file tree Collapse file tree 1 file changed +8
-1
lines changed Original file line number Diff line number Diff line change @@ -53,15 +53,17 @@ core.trap_add() {
53
53
# start
54
54
___global_trap_table___[" $signal_spec " ]=" ${___global_trap_table___[$signal_spec]} " $' \x1C ' " $function "
55
55
56
+ # rho (WET)
56
57
local global_trap_handler_name=
57
58
printf -v global_trap_handler_name ' %q' " ___global_trap_${signal_spec} _handler___"
58
59
59
60
if ! eval " $global_trap_handler_name () {
60
- core.trap_common_global_handler " $signal_spec "
61
+ core.trap_common_global_handler ' $signal_spec '
61
62
}" ; then
62
63
printf ' %s\n' " Error: core.trap_add: Could not eval function"
63
64
return 1
64
65
fi
66
+ # shellcheck disable=SC2064
65
67
trap " $global_trap_handler_name " " $signal_spec "
66
68
}
67
69
@@ -115,6 +117,11 @@ core.trap_remove() {
115
117
done ; unset trap_handler
116
118
117
119
___global_trap_table___[" $signal_spec " ]=" $new_trap_handlers "
120
+
121
+ # rho (WET)
122
+ local global_trap_handler_name=
123
+ printf -v global_trap_handler_name ' %q' " ___global_trap_${signal_spec} _handler___"
124
+ unset -f " $global_trap_handler_name "
118
125
}
119
126
120
127
# @description Modifies current shell options and pushes information to stack, so
You can’t perform that action at this time.
0 commit comments