Commit a06329db authored by Dylan Araps's avatar Dylan Araps

getterm: Use /proc/$PPID/comm instead of ps

parent 41c778f6
......@@ -1453,8 +1453,8 @@ getterm() {
;;
*)
parent="$(ps -p ${1:-$PPID} -o ppid=)"
name="$(ps -p $parent -o comm=)"
parent="$(grep -F "PPid:" "/proc/${1:-$PPID}/status")"
name="$(< "/proc/${parent/PPid:[[:space:]]}/comm")"
;;
esac
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment