From c7c84fcbba74770ccacae3c8e62308a9e4a8e3cb Mon Sep 17 00:00:00 2001 From: Muhammad Herdiansyah Date: Sun, 4 Jun 2017 00:03:03 +0700 Subject: [PATCH] Term: Break from loop if PPID can't be accessed/not found --- neofetch | 1 + 1 file changed, 1 insertion(+) diff --git a/neofetch b/neofetch index 802e43f7..6019a6d5 100755 --- a/neofetch +++ b/neofetch @@ -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"*) ;;