|
|
@ -459,11 +459,13 @@ run 'cut -c3- ~/.tmux.conf | sh -s _apply_configuration' |
|
|
|
# |
|
|
|
# if [ x"$cygwin" = x"true" ]; then |
|
|
|
# ps -af | tail -n +2 | awk -v tty="$tty" ' |
|
|
|
# $4 == tty { user[$2] = $1; child[$3] = $2 } |
|
|
|
# ((/ssh/ && !/-W/) || !/ssh/) && $4 == tty { |
|
|
|
# user[$2] = $1; parent[$2] = $3; child[$3] = $2 |
|
|
|
# } |
|
|
|
# END { |
|
|
|
# for (i in user) |
|
|
|
# { |
|
|
|
# if (!(i in child)) |
|
|
|
# if (!(i in child) && parent[i] != 1) |
|
|
|
# { |
|
|
|
# file = "/proc/" i "/cmdline"; getline command < file; close(file) |
|
|
|
# gsub(/\0/, " ", command) |
|
|
@ -475,11 +477,13 @@ run 'cut -c3- ~/.tmux.conf | sh -s _apply_configuration' |
|
|
|
# ' |
|
|
|
# else |
|
|
|
# ps -t "$tty" -o user= -o pid= -o ppid= -o command= | awk ' |
|
|
|
# { user[$2] = $1; child[$3] = $2; for (i = 4 ; i <= NF; ++i) command[$2] = i > 4 ? command[$2] FS $i : $i } |
|
|
|
# (/ssh/ && !/-W/) || !/ssh/ { |
|
|
|
# user[$2] = $1; parent[$2] = $3; child[$3] = $2; for (i = 4 ; i <= NF; ++i) command[$2] = i > 4 ? command[$2] FS $i : $i |
|
|
|
# } |
|
|
|
# END { |
|
|
|
# for (i in user) |
|
|
|
# for (i in parent) |
|
|
|
# { |
|
|
|
# if (!(i in child)) |
|
|
|
# if (!(i in child) && parent[i] != 1) |
|
|
|
# { |
|
|
|
# print i, user[i], command[i] |
|
|
|
# exit |
|
|
|