host: skip if utmp.Type is not USERPROCESS (defined in utmpx.h)
This commit is contained in:
parent
a5d366a70c
commit
f2435bc8de
|
@ -97,7 +97,7 @@ func Users() ([]UserStat, error) {
|
|||
if err != nil {
|
||||
continue
|
||||
}
|
||||
if u.Line[0] == 0 { // skip if terminal is empty
|
||||
if u.Type != 7 { // skip if not USERPROCESS
|
||||
continue
|
||||
}
|
||||
user := UserStat{
|
||||
|
|
Loading…
Reference in New Issue