fixed _tty_info() to properly discard daemons and their children, fixes #320
This commit is contained in:
parent
f4fc2730cf
commit
a83ba39f09
1 changed files with 11 additions and 3 deletions
14
.tmux.conf
14
.tmux.conf
|
@ -480,9 +480,13 @@ run -b '[ -z "#{window_active}" ] && [ -z "#{version}" ] && tmux set display-tim
|
||||||
# user[$2] = $1; parent[$2] = $3; child[$3] = $2
|
# user[$2] = $1; parent[$2] = $3; child[$3] = $2
|
||||||
# }
|
# }
|
||||||
# END {
|
# END {
|
||||||
# for (i in user)
|
# for (i in parent)
|
||||||
# {
|
# {
|
||||||
# if (!(i in child) && parent[i] != 1)
|
# j = i
|
||||||
|
# while (parent[j])
|
||||||
|
# j = parent[j]
|
||||||
|
#
|
||||||
|
# if (!(i in child) && j != 1)
|
||||||
# {
|
# {
|
||||||
# file = "/proc/" i "/cmdline"; getline command < file; close(file)
|
# file = "/proc/" i "/cmdline"; getline command < file; close(file)
|
||||||
# gsub(/\0/, " ", command)
|
# gsub(/\0/, " ", command)
|
||||||
|
@ -500,7 +504,11 @@ run -b '[ -z "#{window_active}" ] && [ -z "#{version}" ] && tmux set display-tim
|
||||||
# END {
|
# END {
|
||||||
# for (i in parent)
|
# for (i in parent)
|
||||||
# {
|
# {
|
||||||
# if (!(i in child) && parent[i] != 1)
|
# j = i
|
||||||
|
# while (parent[j])
|
||||||
|
# j = parent[j]
|
||||||
|
#
|
||||||
|
# if (!(i in child) && j != 1)
|
||||||
# {
|
# {
|
||||||
# print i, user[i], command[i]
|
# print i, user[i], command[i]
|
||||||
# exit
|
# exit
|
||||||
|
|
Loading…
Reference in a new issue