
      settrap() {
         if test ! -n "`trap 2>&1 1>/dev/null 2`"; then
            if test -n "${1}"; then
               trap "trap 2; ${1}; exit" 2
            else
               trap 2
            fi
         else
            if test -n "${1}"; then
               trap "trap SIGINT; ${1}; exit" SIGINT
            else
               trap SIGINT
            fi
         fi
      }
