Make w make better guesses for user process
Based on suggestion by Herbert Xu <herbert@gondor.apana.org.au> Bug-Debian: http://bugs.debian.org/187808 Author: Craig Small <csmall@debian.org>
This commit is contained in:
parent
5f570a84f1
commit
63b6a8fcbf
2
w.c
2
w.c
@ -159,7 +159,7 @@ static const proc_t *getproc(const utmp_t *restrict const u, const char *restric
|
|||||||
secondbest = tmp;
|
secondbest = tmp;
|
||||||
}
|
}
|
||||||
if(!ignoreuser && uid != tmp->euid && uid != tmp->ruid) continue;
|
if(!ignoreuser && uid != tmp->euid && uid != tmp->ruid) continue;
|
||||||
if(tmp->tgid != tmp->tpgid) continue;
|
if(tmp->pgrp != tmp->tpgid) continue;
|
||||||
if(best && tmp->start_time <= best->start_time) continue;
|
if(best && tmp->start_time <= best->start_time) continue;
|
||||||
best = tmp;
|
best = tmp;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user