ps thread support
This commit is contained in:
4
w.c
4
w.c
@ -146,7 +146,7 @@ static const proc_t *getproc(const utmp_t *restrict const u, const char *restric
|
||||
*found_utpid = 0;
|
||||
for(; *pptr; pptr++) {
|
||||
const proc_t *restrict const tmp = *pptr;
|
||||
if(unlikely(tmp->pid == u->ut_pid)) {
|
||||
if(unlikely(tmp->tgid == u->ut_pid)) {
|
||||
*found_utpid = 1;
|
||||
best = tmp;
|
||||
}
|
||||
@ -158,7 +158,7 @@ static const proc_t *getproc(const utmp_t *restrict const u, const char *restric
|
||||
secondbest = tmp;
|
||||
}
|
||||
if(!ignoreuser && uid != tmp->euid && uid != tmp->ruid) continue;
|
||||
if(tmp->pid != tmp->tpgid) continue;
|
||||
if(tmp->tgid != tmp->tpgid) continue;
|
||||
if(best && tmp->start_time <= best->start_time) continue;
|
||||
best = tmp;
|
||||
}
|
||||
|
Reference in New Issue
Block a user