__prompt_exit()
{
  if [ "$3" -eq 0 ]
  then
    return 0
  elif [ "$3" -lt 128 ]
  then
    printf "$1" "$3"
  else
    __prompt_exit_signal="$(kill -l "$(($3 - 128))" 2> '/dev/null')"
    if ! [ "$__prompt_exit_signal" ]
    then
      printf "$1" "$3"
      return 0
    fi
    for __prompt_exit_signal_mask in $2
    do
      if [ "$__prompt_exit_signal" = "$__prompt_exit_signal_mask" ]
      then
        return 0
      fi
    done
    printf "$1" "$__prompt_exit_signal"
  fi
}