Term: Break from loop if PPID can't be accessed/not found

This commit is contained in:
Muhammad Herdiansyah 2017-06-04 00:03:03 +07:00
parent ab1e05adff
commit c7c84fcbba

View file

@ -1652,6 +1652,7 @@ get_term() {
term="$SSH_TTY"
else
parent="$(get_ppid "$parent")"
[[ -z "$parent" ]] && break
name="$(get_process_name "$parent")"
case "${name// }" in
"${SHELL/*\/}" | *"sh" | "tmux"* | "screen" | "su"*) ;;