Merge pull request #742 from konimex/terminal

Term: Break from loop if PPID can't be accessed/not found
This commit is contained in:
Dylan Araps 2017-06-04 11:10:33 +10:00 committed by GitHub
commit 01a5c7da81
1 changed files with 1 additions and 0 deletions

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"*) ;;