Use /proc/.../cmdline instead of /proc/.../comm

/proc/.../comm is limited to 16 bytes. So, long terminal names like
io.elementary.terminal (default terminal for Elementary OS) gets
truncated to 15 characters.
This commit is contained in:
Subhaditya Nath 2022-01-22 18:53:02 +05:30
parent ccd5d9f526
commit 2fb6f214eb

View file

@ -4943,7 +4943,7 @@ get_process_name() {
;;
"Linux")
name="$(< "/proc/${1:-$PPID}/comm")"
read -rd $'\00' name < "/proc/${1:-$PPID}/cmdline"
;;
*)