Signal handlers are stored in hooks, one hook for every signal specification; Executing commands with event hooks.
Add HANDLER to the SIGNAME’s hook. When successful return true; otherwise return false. If currently there is no SIGNAME’s hook: a new hook is defined.
function my_sigkill_handler () { echo gotcha >&2 } mbfl_signal_attack 'SIGKILL' my_sigkill_handler
Return true if SIGNAME has handlers associated to it, using this MBFL module; otherwise return false.
Undefine all the signal hooks, implicitly removing all the registered handlers.
Undefine the signal hook associated to SIGNAME, implicitly removing all the registered handlers.
Run the hook associated to the signal SIGNAME. This function is not meant to be used during normal scripts execution, but it may be useful to debug a script by simulating signal delivery.
If SIGNAME is a valid signal name: store in the result variable HOOK_RV SIGNAME’s hook data variable, then return true; otherwise return false. If currently there is no SIGNAME’s hook: a new hook is defined.
mbfl_declare_varref(SIGKILL_HOOK) mbfl_signal_hook_var _(SIGKILL_HOOK) 'SIGKILL' mbfl_hook_add $SIGKILL_HOOK 'my_signal_handler'
This document describes version 3.0.0-devel.9 of Marcos Bash Functions Library.