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() {
5353 # start
5454 ___global_trap_table___[" $signal_spec " ]=" ${___global_trap_table___[$signal_spec]} " $' \x1C ' " $function "
5555
56+ # rho (WET)
5657 local global_trap_handler_name=
5758 printf -v global_trap_handler_name ' %q' " ___global_trap_${signal_spec} _handler___"
5859
5960 if ! eval " $global_trap_handler_name () {
60- core.trap_common_global_handler " $signal_spec "
61+ core.trap_common_global_handler ' $signal_spec '
6162}" ; then
6263 printf ' %s\n' " Error: core.trap_add: Could not eval function"
6364 return 1
6465 fi
66+ # shellcheck disable=SC2064
6567 trap " $global_trap_handler_name " " $signal_spec "
6668}
6769
@@ -115,6 +117,11 @@ core.trap_remove() {
115117 done ; unset trap_handler
116118
117119 ___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 "
118125}
119126
120127# @description Modifies current shell options and pushes information to stack, so
You can’t perform that action at this time.
0 commit comments