host: skip if utmp.Type is not USERPROCESS (defined in utmpx.h)

This commit is contained in:
若山史郎 2015-02-14 23:08:05 +09:00
parent a5d366a70c
commit f2435bc8de
1 changed files with 1 additions and 1 deletions

View File

@ -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{