concept

Reset trap actions

Restore the default action for selected signals or pseudo-events. Does not mean ignore; an empty action is different.

Formal Syntax & Structure

bash syntaxbash
trap - event ...

Return Value

exit status

Restore the default action for selected signals or pseudo-events. Does not mean ignore; an empty action is different.

Working Example

Example Snippetbash
trap ':' RETURNif [[ -n $(trap -p RETURN) ]]; then printf 'installed\n'; fitrap - RETURNif [[ -z $(trap -p RETURN) ]]; then printf 'reset\n'; fi
Bash Reference