Переглянути джерело

rbenv-rehash: remove superfluous trap signals

A trap on the special signal EXIT is executed before the shell
terminates. EXIT actually covers SIGINT and SIGTERM as well, and
we don't need any extra traps for them.

See bash(1) and "help trap" in bash.
pull/360/head^2
Mathias Lafeldt 14 роки тому
джерело
коміт
0324b118ee
1 змінених файлів з 1 додано та 1 видалено
  1. +1
    -1
      libexec/rbenv-rehash

+ 1
- 1
libexec/rbenv-rehash Переглянути файл

@ -22,7 +22,7 @@ set +o noclobber
# If we were able to obtain a lock, register a trap to clean up the
# prototype shim when the process exits.
trap remove_prototype_shim SIGINT SIGTERM EXIT
trap remove_prototype_shim EXIT
remove_prototype_shim() {
rm -f "$PROTOTYPE_SHIM_PATH"

Завантаження…
Відмінити
Зберегти